catgan icon indicating copy to clipboard operation
catgan copied to clipboard

Error while executing at line #74

Open SHANKARMB opened this issue 6 years ago • 1 comments

load MNIST dataset epoch 1 Traceback (most recent call last): File "catgan_train.py", line 164, in fake_x=gen(z) File "catgan_train.py", line 73, in call h1=F.leaky_relu(self.bn0(self.l0(z),test),slope=0.1) TypeError: call() takes 2 positional arguments but 3 were given


Someone in other issue page suggested to remove test in func call... tried it .. but didn't work..

Even after making above changes, I get this error.. load MNIST dataset epoch 1 Traceback (most recent call last): File "catgan_train.py", line 164, in <module> fake_x=gen(z) File "catgan_train.py", line 74, in __call__ h2=F.leaky_relu(self.bn1(self.l1(h1),test),slope=0.1) TypeError: __call__() takes 2 positional arguments but 3 were given


I removed test from all these 3 line..
h1=F.leaky_relu(self.bn0(self.l0(z)),slope=0.1) h2=F.leaky_relu(self.bn1(self.l1(h1)),slope=0.1) h3=F.leaky_relu(self.bn2(self.l2(h2))) h4=F.sigmoid(self.l3(h3)) It still gives me this error..
load MNIST dataset epoch 1 Traceback (most recent call last): File "catgan_train.py", line 165, in fake_y=dis(fake_x) File "catgan_train.py", line 117, in call h1=F.leaky_relu(self.bn0(self.l0(x)+F.gaussian(mu_array2,log_std_array2),test),slope=0.1) TypeError: call() takes 2 positional arguments but 3 were given


So I removed test in other calls too... like this..

h1=F.leaky_relu(self.bn0(self.l0(x)+F.gaussian(mu_array2,log_std_array2)),slope=0.1) h2=F.leaky_relu(self.bn1(self.l1(h1)+F.gaussian(mu_array3,log_std_array3)),slope=0.1) h3=F.leaky_relu(self.bn2(self.l2(h2)+F.gaussian(mu_array4,log_std_array4)),slope=0.1) h4=F.leaky_relu(self.bn3(self.l3(h3)+F.gaussian(mu_array5,log_std_array5)),slope=0.1) h5=F.leaky_relu(self.bn4(self.l4(h4)+F.gaussian(mu_array6,log_std_array6)),slope=0.1) h6=F.softmax(self.l5(h5))


It gives me this error..


load MNIST dataset epoch 1 Traceback (most recent call last): File "catgan_train.py", line 170, in o_dis.zero_grads() AttributeError: 'Adam' object has no attribute 'zero_grads'

SHANKARMB avatar Apr 05 '18 17:04 SHANKARMB

did you solve this problem?

amen183 avatar Oct 26 '18 00:10 amen183