about training
foralliance opened this issue · comments
@abhi2610 HI
When I perform the training, encount the following error
Traceback (most recent call last):
File "./tools/train_net.py", line 113, in <module>
max_iters=args.max_iters)
File "/home/jmx/ohem-end2end/tools/../lib/fast_rcnn/train.py", line 160, in train_net
model_paths = sw.train_model(max_iters)
File "/home/jmx/ohem-end2end/tools/../lib/fast_rcnn/train.py", line 101, in train_model
self.solver.step(1)
File "/home/jmx/ohem-end2end/tools/../lib/roi_data_layer/layer.py", line 242, in forward
for x in [cls_prob[i,label] for i, label in enumerate(labels)]]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
How do I modify it
many many thanks!!!
@foralliance You'll have to inspect i
and label
variables which are being used as index for cls_prob
Sorry to bother you again.
Copy your code completely. Why did this happen? How to modify it?
@foralliance again, I'm not sure exactly what dataset you're running it on. Please inspect i
and label
and make sure that they are integers
(as opposed to float
).