C2AE-Multilabel-Classification icon indicating copy to clipboard operation
C2AE-Multilabel-Classification copied to clipboard

which tensorflow version

Open zy86603465 opened this issue 8 years ago • 2 comments

=> 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

zy86603465 avatar Aug 23 '17 09:08 zy86603465

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

dhruvramani avatar Aug 23 '17 17:08 dhruvramani

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 ~

Yong-DAI avatar Jan 22 '18 09:01 Yong-DAI