Skip to content

fix index bug.the original index is a float datatype#69

Open
elias-1 wants to merge 1 commit intosmallcorgi:masterfrom
elias-1:master
Open

fix index bug.the original index is a float datatype#69
elias-1 wants to merge 1 commit intosmallcorgi:masterfrom
elias-1:master

Conversation

@elias-1
Copy link
Copy Markdown

@elias-1 elias-1 commented Jan 25, 2017

The error info is presented as follows:

Traceback (most recent call last): File "/home/elias/code/tensorflow-env-0-11/local/lib/python2.7/site-packages/tensorflow/python/ops/script_ops.py", line 83, in __call__ ret = func(*args) File "/home/elias/code/Faster-RCNN_TF/tools/../lib/rpn_msr/proposal_target_layer_tf.py", line 48, in proposal_target_layer rois_per_image, _num_classes) File "/home/elias/code/Faster-RCNN_TF/tools/../lib/rpn_msr/proposal_target_layer_tf.py", line 154, in _sample_rois _get_bbox_regression_labels(bbox_target_data, num_classes) File "/home/elias/code/Faster-RCNN_TF/tools/../lib/rpn_msr/proposal_target_layer_tf.py", line 90, in _get_bbox_regression_labels bbox_targets[ind, start:end] = bbox_target_data[ind, 1:] TypeError: slice indices must be integers or None or have an __index__ method
Traceback (most recent call last): File "/home/elias/code/tensorflow-env-0-11/local/lib/python2.7/site-packages/tensorflow/python/ops/script_ops.py", line 83, in __call__ ret = func(*args) File "/home/elias/code/Faster-RCNN_TF/tools/../lib/rpn_msr/proposal_target_layer_tf.py", line 48, in proposal_target_layer rois_per_image, _num_classes) File "/home/elias/code/Faster-RCNN_TF/tools/../lib/rpn_msr/proposal_target_layer_tf.py", line 139, in _sample_rois bg_inds = npr.choice(bg_inds, size=bg_rois_per_this_image, replace=False) File "mtrand.pyx", line 1176, in mtrand.RandomState.choice (numpy/random/mtrand/mtrand.c:18822) TypeError: 'numpy.float64' object cannot be interpreted as an index

wadefelix pushed a commit to wadefelix/Faster-RCNN_TF that referenced this pull request Feb 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant