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