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

which tensorflow version #1

Open
zy86603465 opened this issue Aug 23, 2017 · 2 comments
Open

which tensorflow version #1

zy86603465 opened this issue Aug 23, 2017 · 2 comments

Comments

@zy86603465
Copy link

=> Training Model
Traceback (most recent call last):
File "/home/q/zhangyuzyy.zhang/C2AE-Multilabel-Classification/model/src/main.py", line 204, in
main() # Phew!
File "/home/q/zhangyuzyy.zhang/C2AE-Multilabel-Classification/model/src/main.py", line 189, in main
loss_dict = train_model(config)
File "/home/q/zhangyuzyy.zhang/C2AE-Multilabel-Classification/model/src/main.py", line 180, in train_model
model, sess = init_model(config)
File "/home/q/zhangyuzyy.zhang/C2AE-Multilabel-Classification/model/src/main.py", line 163, in init_model
model = Model(config)
File "/home/q/zhangyuzyy.zhang/C2AE-Multilabel-Classification/model/src/main.py", line 24, in init
self.loss = self.net.loss(self.x, self.y, self.keep_prob)
File "/home/q/zhangyuzyy.zhang/C2AE-Multilabel-Classification/model/src/network.py", line 111, in loss
return self.embedding_loss(Fx, Fe) + self.config.solver.alpha * self.output_loss(prediction, labels) + lamda * l2_norm # self.cross_loss(features, labels, keep_prob)
File "/home/q/zhangyuzyy.zhang/C2AE-Multilabel-Classification/model/src/network.py", line 86, in output_loss
cond = tf.cond(i >= tf.shape(labels)[0] - 1, lambda: 0, lambda: 1)
File "/home/q/zhangyuzyy.zhang/anaconda3/envs/python27/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1759, in cond
orig_res, res_t = context_t.BuildCondBranch(fn1)
File "/home/q/zhangyuzyy.zhang/anaconda3/envs/python27/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1686, in BuildCondBranch
real_v = self._ProcessOutputTensor(v)
File "/home/q/zhangyuzyy.zhang/anaconda3/envs/python27/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1644, in _ProcessOutputTensor
if val.name not in self._values:
AttributeError: 'int' object has no attribute 'name'

I use tensorflow 1.0

@dhruvramani
Copy link
Owner

I am using version Tensorflow 1.2.1
Try updating, and then it should work. If not, use tf.constant.

@Yong-DAI
Copy link

hey, when I run this program , with the epoch number up, the memory that was used up sharply, Actually, I have 16GB RAM, but sometimes ,when I change some parameters, it can not get a final result, I have try some methods to release the memory, but never work,so, do you have some ideas? thank you ~

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

3 participants