當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。