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
TypeError: zeros_initializer() takes at least 1 argument (0 given) #13
Comments
i solved this problem firstly, upgrade tensorflow to R1.0.1 second, install dependencies third, upgrade code(misc, stageI, and stageII folder python codes) using tf_upgrade fourth, change misc/datasets.py h1 = np.floor((ori_size - self._imsize) * np.random.random()) to h1 = int(np.floor((ori_size - self._imsize) * np.random.random())) now, i'm training dataset with CPU : intel core i5-7600 |
I also found it was tf version issue. HOWEVER, if you upgrad the tf version into 1.0.1, you will get type error since tf 1.0.1 version have changed the argument order of tf.concat function. (google/prettytensor#48) To avoid this error, you have to change the argument order of tf.concat (i.e. tf.concat(1, [c,z]) --> tf.concat[c,z], 1) If you want modified stable version of this code, refer to my repo |
@seongkyun thank you nery much ! it really works ! |
@leeeeeeo can you give me details of solution?Thanks a lot. |
@seongkyun @nashory can you tell me your tensorflow version?I want to run the stackGAN,but i am confused about how to configure the environment.Thanks a lot. |
@chaowentao version has already shown at the last of @seongkyun 's comment. and it really works. just follow his solution. |
@leeeeeeo thank you.I'll try it. |
@leeeeeeo Do i still need to redo the images processing? |
@chaowentao maybe. i did. |
@leeeeeeo my result is |
@chaowentao somewhere went wrong. i didnt meet this. try again. |
its a version problem: |
(move run_exp.py as recommended by: hanzhanggit/StackGAN#13 (comment), which seems to be necessary for training either stage) fix config to point to real pretrained model. was pointing to some nonexistent file before
i wrote
$ python run_exp.py --cfg stageI/cfg/birds.yml --gpu 0
and it prints out
Traceback (most recent call last):
File "run_exp.py", line 11, in
from stageI.model import CondGAN
File "/home/han/StackGAN/stageI/model.py", line 4, in
import prettytensor as pt
File "/home/han/anaconda2/lib/python2.7/site-packages/prettytensor/init.py", line 25, in
from prettytensor import funcs
File "/home/han/anaconda2/lib/python2.7/site-packages/prettytensor/funcs.py", line 25, in
from prettytensor.pretty_tensor_image_methods import *
File "/home/han/anaconda2/lib/python2.7/site-packages/prettytensor/pretty_tensor_image_methods.py", line 135, in
class conv2d(prettytensor.VarStoreMethod):
File "/home/han/anaconda2/lib/python2.7/site-packages/prettytensor/pretty_tensor_image_methods.py", line 145, in conv2d
bias=tf.zeros_initializer(),
TypeError: zeros_initializer() takes at least 1 argument (0 given)
what should i do?
please help me.
I'm running on Ubuntu 16.04, tensorflow r0.11 with cuda8.0 and cudnn5.1
The text was updated successfully, but these errors were encountered: