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

A error while training #10

Open
ghost opened this issue Mar 1, 2017 · 2 comments
Open

A error while training #10

ghost opened this issue Mar 1, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 1, 2017

Hi! I installed a python, then installed recent versions of sugartensor and tensorflow using

pip install tensorflow
pip install sugartensor.

While trying to run "train.py" file it gives me this traceback:

Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.

===================== RESTART: E:\SRGAN-master\train.py =====================
Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
Extracting ./asset/data/mnist\train-images-idx3-ubyte.gz
Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
Extracting ./asset/data/mnist\train-labels-idx1-ubyte.gz
Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
Extracting ./asset/data/mnist\t10k-images-idx3-ubyte.gz
Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
Extracting ./asset/data/mnist\t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):
File "E:\SRGAN-master\train.py", line 36, in
y_disc = tf.concat(0, [y, y * 0])
File "D:\Python35\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1047, in concat
dtype=dtypes.int32).get_shape(
File "D:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 651, in convert_to_tensor
as_ref=False)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 716, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\constant_op.py", line 176, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\constant_op.py", line 165, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "D:\Python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 367, in make_tensor_proto
_AssertCompatible(values, dtype)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

@zmlmanly
Copy link

zmlmanly commented Mar 9, 2017

y_disc = tf.concat(0, [y, y * 0]) is the old tensorflow. If you install tf1.0.0, you should change it to y_disc = tf.concat( [y, y * 0], 0).

@yuanshuai220
Copy link

yuanshuai220 commented Apr 26, 2017

Change it like following:

discriminator labels ( half 1s, half 0s )

y_disc = tf.concat([y, y * 0], 0)

input image pairs

x_real_pair = tf.concat([x_nearest, x], 3)
x_fake_pair = tf.concat([x_nearest, gen], 3)

create real + fake image input

xx = tf.concat([x_real_pair, x_fake_pair], 0)

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