Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line 164 #3

Open
mmosquera10 opened this issue Jun 28, 2017 · 3 comments
Open

Line 164 #3

mmosquera10 opened this issue Jun 28, 2017 · 3 comments

Comments

@mmosquera10
Copy link

Hello,

I keep getting this error when I try to compile your code:
GPU: -1

Minibatch-size: 100

epoch: 200

load MNIST dataset
Downloading train-images-idx3-ubyte.gz...
Done
Downloading train-labels-idx1-ubyte.gz...
Done
Downloading t10k-images-idx3-ubyte.gz...
Done
Downloading t10k-labels-idx1-ubyte.gz...
Done
Converting training data...
Done
Converting test data...
Done
Save output...
Done
Convert completed
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 exactly 2 arguments (3 given)

Could you please help? Thank you.

@mohebbihr
Copy link

Hi, I am facing the same problem. Please tell me how did you solve this issue. Thanks

@LIEWyiyi
Copy link

LIEWyiyi commented Dec 25, 2017

change
h1=F.leaky_relu(self.bn0(self.l0(z),test),slope=0.1)
to
h1=F.leaky_relu(self.bn0(self.l0(z)),slope=0.1)
will work in chainer 3.2.0
@mohebbihr @mmosquera10

@SHANKARMB
Copy link

SHANKARMB commented Apr 5, 2018

Even I have the same error..
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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants