本文整理汇总了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())