Closed rw1993 closed 6 years ago
Hello, I had this problem when I tried to use the code on another machine where I installed the latest tensorflow (1.2.0) ,downgrading to tensorflow 1.0 should probably fix it
you just go to RFCN-tensorflow/Utils/MultiGather.py at line 30: change src code: values, indices = tf.cond(isMoreThanK, lambda: tf.nn.top_k(t, k=k, sorted=sorted), lambda: tf.tuple([t, tf.zeros((0,1), tf.int32)])) to values, indices = tf.cond(isMoreThanK, lambda: tf.tuple(tf.nn.top_k(t, k=k, sorted=sorted)), lambda: tf.tuple([t, tf.zeros((0,1), tf.int32)]))
Just made it compatible with newer TF versions. This should not be a problem anymore.
I run the command below
CUDA_VISIBLE_DEVICES= python test.py -n /data1/export/model -i /data/coco/images/train2014/COCO_train2014_000000144590.jpg -o result.jpg
get TypeError
TypeError: Incompatible return types of true_fn and false_fn: The two structures don't have the same sequence type. First structure has type <class 'tensorflow.python.ops.gen_nn_ops.TopKV2'>, while second structure has type <type 'list'>.
How solve this problem?