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

Got error using my own data #102

Open
ComputerMystery opened this Issue Feb 10, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@ComputerMystery

ComputerMystery commented Feb 10, 2017

Traceback (most recent call last):
File "/home/sal/Downloads/pycharm-community-2016.2.3/helpers/pydev/pydevd.py", line 1580, in
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/sal/Downloads/pycharm-community-2016.2.3/helpers/pydev/pydevd.py", line 964, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/sal/PycharmProjects/ReID/GANReID/main.py", line 96, in
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "/home/sal/PycharmProjects/ReID/GANReID/main.py", line 76, in main
sample_dir=FLAGS.sample_dir)
File "/home/sal/PycharmProjects/ReID/GANReID/model.py", line 75, in init
self.build_model()
File "/home/sal/PycharmProjects/ReID/GANReID/model.py", line 107, in build_model
self.G = self.generator(self.z)
File "/home/sal/PycharmProjects/ReID/GANReID/model.py", line 359, in generator
self.z_, [-1, s_h16, s_w16, self.gf_dim * 8])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 1991, in reshape
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 573, in apply_op
_Attr(op_def, input_arg.type_attr))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 60, in _SatisfiesTypeConstraint
", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: DataType float32 for attr 'Tshape' not in list of allowed values: int32, int64

@ComputerMystery

This comment has been minimized.

ComputerMystery commented Feb 10, 2017

Any help will be appreciated

@ComputerMystery

This comment has been minimized.

ComputerMystery commented Feb 11, 2017

in the model.py seems exits a bug that this part below returns a float for reshape but reshape just accept int32. Need to convert

def conv_out_size_same(size, stride): return math.ceil(float(size) / float(stride))

@ComputerMystery

This comment has been minimized.

ComputerMystery commented Feb 11, 2017

It works now!

@mittlin

This comment has been minimized.

mittlin commented Feb 13, 2017

@ComputerMystery , Do you fix the error?

@ComputerMystery

This comment has been minimized.

ComputerMystery commented Feb 13, 2017

@mittlin Already fixed . Just forced type convert to int for the returndef conv_out_size_same(size, stride): return int(math.ceil(float(size) / float(stride)))

@mittlin

This comment has been minimized.

mittlin commented Feb 16, 2017

@ComputerMystery ,thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment