Skip to content

Commit

Permalink
rm test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghang1989 committed May 24, 2018
1 parent f74acb7 commit 2e83e2d
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions example/gluon/style_transfer/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,26 +302,3 @@ def forward(self, X):
relu4_3 = h

return [relu1_2, relu2_2, relu3_3, relu4_3]


def test_InstanceNorm():
import torch
from torch import nn as nn2
from torch.autograd import Variable
tx = Variable(torch.Tensor(1, 2, 200, 300).uniform_(0,1))
tlayer = nn2.InstanceNorm2d(2)
ty = tlayer(tx)

mlayer = InstanceNorm(2)
ctx = mx.cpu(0)
mlayer.initialize(ctx=ctx)
mmx = (mx.nd.array(tx.data.numpy())).as_in_context(ctx)
my = mlayer(mmx)
print('tx',tx)
print('mmx',mmx)
print('ty',ty)
print('my',my)

if __name__ == "__main__":
test_InstanceNorm()

0 comments on commit 2e83e2d

Please sign in to comment.