f96176e2ebabf3a976e0f890b93f10ace7c14f5a,train.py,,,#,25
Before Change
maintain_averages_op = tf.group(ema.apply(all_params))
// sample from the model
x_sample = tf.placeholder(tf.float32, shape=(args.sample_batch_size, 32, 32, 3))
gen_par = model(x_sample, ema=ema, dropout_p=0, **model_opt)
new_x_gen = nn.sample_from_discretized_mix_logistic(gen_par, args.nr_logistic_mix)
def sample_from_model(sess):
After Change
// initialize data loaders for train/test splits
DataLoader = {"cifar":cifar10_data.DataLoader, "imagenet":imagenet_data.DataLoader}[args.data_set]
train_data = DataLoader(args.data_dir, "train", args.batch_size * args.nr_gpu, rng=rng, shuffle=True)
test_data = DataLoader(args.data_dir, "test", args.batch_size * args.nr_gpu, shuffle=False)
obs_shape = train_data.get_observation_size() // e.g. a tuple (32,32,3)
// create the model
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: openai/pixel-cnn
Commit Name: f96176e2ebabf3a976e0f890b93f10ace7c14f5a
Time: 2016-11-01
Author: andrej.karpathy@gmail.com
File Name: train.py
Class Name:
Method Name:
Project Name: yhenon/pytorch-retinanet
Commit Name: b6443232013e8d248fe26f59630d43bc9688df06
Time: 2018-04-29
Author: yannhenon@gmail.com
File Name: train.py
Class Name:
Method Name:
Project Name: modAL-python/modAL
Commit Name: caec2c73aad40c0e632e978964ec5c3cf4773c9e
Time: 2019-06-02
Author: theodore.danka@gmail.com
File Name: examples/pytorch_integration.py
Class Name:
Method Name: