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

error for tensorbayes #4

Open
wac81 opened this issue Apr 8, 2018 · 4 comments
Open

error for tensorbayes #4

wac81 opened this issue Apr 8, 2018 · 4 comments

Comments

@wac81
Copy link

wac81 commented Apr 8, 2018

Traceback (most recent call last):
File "/home/wac/PycharmProjects/vae-clustering/gmvae.py", line 3, in
from tensorbayes.layers import Constant, Placeholder, Dense, GaussianSample
ImportError: cannot import name Constant

tensorbayes == 0.4.0
tensorflow == 1.7.0
how to fix it?

@RuiShu
Copy link
Owner

RuiShu commented Apr 8, 2018

tensorbayes 0.4.0 isn't backwards compatible with this repo.

Try https://github.com/RuiShu/tensorbayes/releases/tag/0.1.1
I think that version is compatible.

@wac81
Copy link
Author

wac81 commented Apr 8, 2018

and i get another error:
tensorflow == 1.7.0
tensorflow == 1.1.0
same error

Traceback (most recent call last):
File "gmvae_k.py", line 34, in
x = Placeholder((None, 784), 'x')
File "/usr/local/lib/python2.7/dist-packages/tensorbayes/layers/simple.py", line 11, in placeholder
return tf.placeholder(dtype, shape, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1507, in placeholder
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 1997, in _placeholder
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 701, in apply_op
attr_value.type = _MakeType(value, attr_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 178, in _MakeType
(attr_def.name, repr(v)))
TypeError: Expected DataType for argument 'dtype' not 'x'.

@DanielTea
Copy link

I have the same issue, unfortunately tensorbayes is not compatible with python 3.6

@rxlgq
Copy link

rxlgq commented Apr 16, 2018

I think you should use the following line
x = Placeholder((None, 784), dtype= 'float32', name = 'x') to replace the line
x = Placeholder((None, 784), 'x').
It will be OK.

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