当前位置: 首页>>代码示例>>Python>>正文


Python tflib.print_model_settings方法代码示例

本文整理汇总了Python中tflib.print_model_settings方法的典型用法代码示例。如果您正苦于以下问题:Python tflib.print_model_settings方法的具体用法?Python tflib.print_model_settings怎么用?Python tflib.print_model_settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tflib的用法示例。


在下文中一共展示了tflib.print_model_settings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import tflib [as 别名]
# 或者: from tflib import print_model_settings [as 别名]
def __init__(self, DATA_DIR='', MODE='wgan-gp', DIM=64, BATCH_SIZE=64, ITERS=200000, 
                    LAMBDA=10, G_OUTPUT_DIM=128*64*3, IMG_H=128, IMG_W=64):
        # Download 64x64 ImageNet at http://image-net.org/small/download.php and
        # fill in the path to the extracted files here!
        self.DATA_DIR = DATA_DIR
        # if len(self.DATA_DIR) == 0:
        #     raise Exception('Please specify path to data directory in wgan_gp_64x64.py!')
        self.MODE = MODE # dcgan, wgan, wgan-gp, lsgan
        self.DIM = DIM # self.MODEl self.DIMensionality
        self.BATCH_SIZE = BATCH_SIZE # Batch size. Must be a multiple of self.N_GPUS
        self.ITERS = ITERS # How many iterations to train for
        self.LAMBDA = LAMBDA # Gradient penalty self.LAMBDA hyperparameter
        self.G_OUTPUT_DIM = G_OUTPUT_DIM # Number of pixels in each iamge
        self.IMG_H = IMG_H
        self.IMG_W = IMG_W

        self.CRITIC_ITERS = 5 # How many iterations to train the critic for
        self.N_GPUS = 1 # Number of GPUs
        self.DEVICES = ['/gpu:{}'.format(i) for i in xrange(self.N_GPUS)]

        lib.print_model_settings(locals().copy()) 
开发者ID:charliememory,项目名称:Pose-Guided-Person-Image-Generation,代码行数:23,代码来源:wgan_gp.py


注:本文中的tflib.print_model_settings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。