RobertCsordas / RFCN-tensorflow

RFCN implementation in TensorFlow
291 stars 137 forks source link

always use top_k call #19

Closed lzzzfelipe closed 6 years ago

lzzzfelipe commented 6 years ago

Fixes the error:

"Incompatible return types of true_fn and false_fn: {}".format(e))
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 <class 'list'>.
RobertCsordas commented 6 years ago

Calling top_k with less input elements than k results in an ugly runtime error, at least with older tensorflow versions, I don't know for new ones. That's why that cond is there. I made it compatible with new tensorflow, but have not removed it.