Closed ZhangXGe closed 4 years ago
I'm not sure I understand your question. If you feed a 32x32x3
cifar picture to the network, it will output a tensor 32x32xD
where at index [i,j]
you have the conditional probability p(x_ij| x_{i,j-1}, ...., x_{0,0})
. So yes, for a trained model, you would probably get an output that is very close to the original picture
Thanks , that's what I mean.But when input is a cifar picture and sample_batch_size=1 ,the output is too poor to recognize. Is that normal?
1) did you train the model and 2) how did you obtain a 32 x 32 x 3
from the 32 x 32 x D
output ?
1.I used pretrained models '589' and '889'.
2.I only change this codedata = torch.zeros(sample_batch_size, obs[0], obs[1], obs[2])
to
data = trans(img) data = torch.unsqueeze(data,0)
,img
is a cifar image.
You don't want to run the nested loops (lines 103
104
) here since you are teacher forcing. Once you have data
try simply doing
data_v = Variable(data, volatile=True)
out = model(data_v, sample=True)
out_sample = sample_op(out)
Ok,i will try it.Thanks very much for answering my questions.
Will output be similar to input if input is a normal picture like one cifar picture ?