3648cbc1a8caa528224750aa2120890fde626fdd,vae/main.py,VAE,reparametrize,#VAE#,57
Before Change
def reparametrize(self, mu, logvar):
std = logvar.mul(0.5).exp_()
if args.cuda:
eps = torch.cuda.FloatTensor(std.size()).normal_()
else:
eps = torch.FloatTensor(std.size()).normal_()
eps = Variable(eps)
return eps.mul(std).add_(mu)
def decode(self, z):
h3 = self.relu(self.fc3(z))
After Change
def reparametrize(self, mu, logvar):
std = logvar.mul(0.5).exp_()
eps = Variable(std.data.new(std.size()).normal_())
return eps.mul(std).add_(mu)
def decode(self, z):
h3 = self.relu(self.fc3(z))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: pytorch/examples
Commit Name: 3648cbc1a8caa528224750aa2120890fde626fdd
Time: 2017-09-22
Author: zryuichi@gmail.com
File Name: vae/main.py
Class Name: VAE
Method Name: reparametrize
Project Name: ikostrikov/pytorch-a2c-ppo-acktr
Commit Name: 54a0f981802ccb86350033a42c3cedd114efc49d
Time: 2017-09-24
Author: ikostrikov@gmail.com
File Name: main.py
Class Name:
Method Name: main
Project Name: vinhkhuc/PyTorch-Mini-Tutorials
Commit Name: 713df9556d874cf9ede91563fccb746b8c54c35f
Time: 2017-05-24
Author: knvinh@gmail.com
File Name: 6_lstm.py
Class Name:
Method Name: predict