FastMaskRCNN icon indicating copy to clipboard operation
FastMaskRCNN copied to clipboard

'Object was never used' Error

Open pannous opened this issue 6 years ago • 2 comments

similar to #134

~/FastMaskRCNN$ python train/train.py |m
P2
P3
P4
P5
anchor_scales =  [8, 16, 32]
anchor_scales =  [4, 8, 16]
anchor_scales =  [2, 4, 8]
anchor_scales =  [1, 2, 4]
5
4
3
2
ERROR:tensorflow:==================================
Object was never used (type <class 'tensorflow.python.framework.ops.Operation'>):
<tf.Operation 'pyramid_2/assert_equal/Assert/Assert' type=Assert>
If you want to mark it as used call its "mark_used()" method.
It was originally created here:
['File "train/train.py", line 339, in <module>\n    train()', 'File "train/train.py", line 193, in train\n    loss_weights=[0.2, 0.2, 1.0, 0.2, 1.0])', 'File "train/../libs/nets/pyramid_network.py", line 588, in build\n    mask_lw=loss_weights[4])', 'File "train/../libs/nets/pyramid_network.py", line 425, in build_losses\n    tf.reshape(bbox_inside_weights, [-1, 4])', 'File "train/../libs/nets/pyramid_network.py", line 126, in _filter_negative_samples\n    tf.assert_equal(tf.shape(t)[0], tf.shape(labels)[0])', 'File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/check_ops.py", line 318, in assert_equal\n    return control_flow_ops.Assert(condition, data, summarize=summarize)', 'File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/tf_should_use.py", line 175, in wrapped\n    return _add_should_use_warning(fn(*args, **kwargs))', 'File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/tf_should_use.py", line 144, in _add_should_use_warning\n    wrapped = TFShouldUseWarningWrapper(x)', 'File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/tf_should_use.py", line 101, in __init__\n    stack = [s.strip() for s in traceback.format_stack()]']
==================================

tf.version '1.3.0'

pannous avatar Sep 16 '17 10:09 pannous

You can try tensorflow 1.0 when I use 1.0 this ERROR disappear

zhijl avatar Sep 20 '17 07:09 zhijl

I had the same problem but fixed when I change train_image_classifier.py line 40 "clone_on_cpu" to True.

AmanuelHirpa avatar Jan 17 '18 06:01 AmanuelHirpa