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


Python config.D属性代码示例

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


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

示例1: load_GD

# 需要导入模块: import config [as 别名]
# 或者: from config import D [as 别名]
def load_GD(path, compile = False):
    G_path = os.path.join(path,'Generator.h5')
    D_path = os.path.join(path,'Discriminator.h5')
    G = load_model(G_path, compile = compile)
    D = load_model(D_path, compile = compile)
    return G,D 
开发者ID:MSC-BUAA,项目名称:Keras-progressive_growing_of_gans,代码行数:8,代码来源:train.py

示例2: save_GD

# 需要导入模块: import config [as 别名]
# 或者: from config import D [as 别名]
def save_GD(G,D,path,overwrite = False):

        os.makedirs(path);
        G_path = os.path.join(path,'Generator.h5')
        D_path = os.path.join(path,'Discriminator.h5')
        save_model(G,G_path,overwrite = overwrite)
        save_model(D,D_path,overwrite = overwrite)
        print("Save model to %s"%path) 
开发者ID:MSC-BUAA,项目名称:Keras-progressive_growing_of_gans,代码行数:10,代码来源:train.py

示例3: load_GD_weights

# 需要导入模块: import config [as 别名]
# 或者: from config import D [as 别名]
def load_GD_weights(G,D,path, by_name = True):
    G_path = os.path.join(path,'Generator.h5')
    D_path = os.path.join(path,'Discriminator.h5')
    G.load_weights(G_path, by_name = by_name)
    D.load_weights(D_path, by_name = by_name)
    return G,D 
开发者ID:MSC-BUAA,项目名称:Keras-progressive_growing_of_gans,代码行数:8,代码来源:train.py

示例4: save_GD_weights

# 需要导入模块: import config [as 别名]
# 或者: from config import D [as 别名]
def save_GD_weights(G,D,path):
    try:
        os.makedirs(path);
        G_path = os.path.join(path,'Generator.h5')
        D_path = os.path.join(path,'Discriminator.h5')
        G.save_weights(G_path)
        D.save_weights(D_path)
        print("Save weights to %s:"%path)
    except:
        print("Save model snapshot failed!") 
开发者ID:MSC-BUAA,项目名称:Keras-progressive_growing_of_gans,代码行数:12,代码来源:train.py


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