Skip to content

TypeError: can't assign a numpy.int64 to a torch.FloatTensor #452

Open
@goodproj13

Description

@goodproj13

Guys,
Did anyone know what caused this issue below? Many thanks in advance.
Torch: 0.40
Python: 3.6

We use voc format of KITTI dataset. The only thing I changed for the original code from this repo is to change the picture format from "jpg" to "png" which is the format for KITTI dataset. When I run ''python trainvel_net.py", I got error below:

Traceback (most recent call last):
File "trainval_net.py", line 209, in
imdb.num_classes, training=True)
File "/home/NewPartion/pycharm/faster-rcnn.pytorch/lib/roi_data_layer/roibatchLoader.py", line 54, in init
self.ratio_list_batch[left_idx:(right_idx+1)] = target_ratio
TypeError: can't assign a numpy.int64 to a torch.FloatTensor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions