Open reachablesa opened 6 years ago
Hi,
You use the same instance of nn.BatchNorm2d
within different layers.
I am not familiar with PyTorch implementation of BN well, but I think you should use a different instance of BN for each layer.
That seems to be the mistake. Thanks for your reply.
@reachablesa Hi reachablesa, I want to implement this code in PyTorch, but when i compute the r_vadv, it is always 0,could you show me your Pytorch code? thanks !
Hi,
I am trying to implement your code in PyTorch.
I believe I implemented VAT loss accurately. But, I cannot get the same performance probably because I used a different ConvNet. When I try to replicate your convnet; namely: "conv-large" the network did not work at all. Here, I am copying my code for conv-large in PyTorch. I would appreciate if you can give me a feedback on what might be wrong.
Also, in the paper you are referring to the paper "Temporal Ensembling for Semi-Supervised Learning" for the network used in experiments. But, they are adding Gaussian noise in the first layer while I could not find noise in your implementation.
import torch.nn as nn import torch.nn.functional as F
class conv_large(nn.Module): def init(self): super(conv_large, self).init()