dhruvramani / C2AE-Multilabel-Classification

Tensorflow implementation for the paper 'Learning Deep Latent Spaces for Multi-Label Classfications' in AAAI 2017
101 stars 24 forks source link

which tensorflow version #1

Open zy86603465 opened 7 years ago

zy86603465 commented 7 years ago

=> 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 commented 7 years ago

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

Yong-DAI commented 6 years ago

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 ~