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

TypeError: __init__() got multiple values for keyword argument 'dtype' #3

Open
carly666 opened this issue Apr 5, 2017 · 2 comments

Comments

@carly666
Copy link

carly666 commented Apr 5, 2017

When I try to run the repository to realize dcgan(After running python download.py mnist successfully, when running python main.py), I meet the problem as follows.

`Traceback (most recent call last):

File "main.py", line 418, in
tf.app.run()
File "/home/pcserver/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 44, in run

_sys.exit(main(_sys.argv[:1] + flags_passthrough))

File "main.py", line 290, in main
net_g, g_logits = generator_simplified_api(z, is_train=True, reuse=False)

File "main.py", line 104, in generator_simplified_api
gamma_init=gamma_init, name='g/h0/batch_norm')

File "/home/pcserver/car/dcgan-master/tensorlayer/layers.py", line 1732, in init
initializer=beta_init)

File "/home/pcserver/car/dcgan-master/tensorlayer/layers.py", line 1717, in _get_variable
trainable=trainable)

File "/home/pcserver/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 988, in get_variable
custom_getter=custom_getter)

File "/home/pcserver/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 890, in get_variable
custom_getter=custom_getter)

File "/home/pcserver/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 348, in get_variable
validate_shape=validate_shape)

File "/home/pcserver/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 333, in _true_getter
caching_device=caching_device, validate_shape=validate_shape)

File "/home/pcserver/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 684, in _get_single_variable
validate_shape=validate_shape)

File "/home/pcserver/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 226, in init
expected_shape=expected_shape)

File "/home/pcserver/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 303, in _init_from_args
initial_value(), name="initial_value", dtype=dtype)

File "/home/pcserver/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 673, in
shape.as_list(), dtype=dtype, partition_info=partition_info)

TypeError: init() got multiple values for keyword argument 'dtype'`

The bold text "init" should be shown as "init" surrouded by two underline.

I cannot find any useful information on google to solve it, so I hope you will help me. @zsdonghao
To make my question clear, my environment is tensorflow 1.0.1. Before that , I have replaced tf.nn.rnn_cell with tf.contrib.rnn to solve the question "No module object named rnn_cell".
And now, this new question makes me stopped.

@zsdonghao
Copy link
Member

please try again

@carly666
Copy link
Author

carly666 commented Apr 12, 2017 via email

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

2 participants