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


Python Dataset.setup_pretraining_obj_patch_dataset方法代码示例

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


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

示例1: Dataset

# 需要导入模块: from dataset import Dataset [as 别名]
# 或者: from dataset.Dataset import setup_pretraining_obj_patch_dataset [as 别名]
    csvm.train(pre_train_probs, train_set_labels, **post_cs_args["train_args"])

    print "starting post-testing on training dataset"
    train_error = csvm.test(pre_test_train_probs, train_set_labels, **post_cs_args["test_args"])
    print "For training %s" %(train_error)

    print "starting post-testing on the  dataset"
    test_error = csvm.test(pre_test_test_probs, test_set_labels, **post_cs_args["test_args"])
    print "For testing %s" %(test_error)

    import ipdb; ipdb.set_trace()

if __name__=="__main__":
    print "Task has just started."
    print "Loading the dataset"
    ds = Dataset()
    patch_size=(8,8)
    ds_path = \
    "/RQusagers/gulcehre/dataset/pentomino/experiment_data/pento64x64_80k_seed_39112222.npy"

    ds.setup_pretraining_obj_patch_dataset(data_path=ds_path, patch_size=patch_size, normalize_inputs=False)
    x = T.matrix('x')
    n_hiddens = [1024, 768]

    prmlp = PatchBasedMLP(x, n_in=8*8, n_hiddens=n_hiddens, n_out=11,
    no_of_patches=3, activation=NeuralActivations.Rectifier, use_adagrad=False)

    csvm = CSVM()
    pre_training(prmlp, csvm, ds)
开发者ID:caglar,项目名称:prmlp,代码行数:31,代码来源:prmlp_postsvm_test_8x8_3patches.py


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