pclucas14 / pixel-cnn-pp

Pytorch Implementation of OpenAI's PixelCNN++
Other
345 stars 76 forks source link

Possible bug? #11

Closed vsub21 closed 5 years ago

vsub21 commented 5 years ago

In utils.py: def concat_elu(x): """ like concatenated ReLU (http://arxiv.org/abs/1603.05201), but then with ELU """ # Pytorch ordering axis = len(x.size()) - 3 return F.elu(torch.cat([x, -x], dim=axis))

How does PyTorch differ from Tensorflow in this regard? Why is this 3 instead of 1?

pclucas14 commented 5 years ago

Hi @vsub21

In pytorch, 4 dimensional tensor are ordered as batch_size x num_channels x height x width, whereas in tensorflow it's batch_size x height x width x channels

vsub21 commented 5 years ago

Thank you for your help! Closing.