-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: can't assign a numpy.int64 to a torch.FloatTensor #452
Comments
please paste all the output from your training run.. so we can see if you enabled CUDA, etc... |
Did you solve this problem? I have the same issue ... |
I didn't solve the problem and I ended up using other's. Sorry!
…________________________________
From: Xu Ma <[email protected]>
Sent: Friday, April 12, 2019 11:26:30 AM
To: jwyang/faster-rcnn.pytorch
Cc: Dongfang Liu; Author
Subject: Re: [jwyang/faster-rcnn.pytorch] TypeError: can't assign a numpy.int64 to a torch.FloatTensor (#452)
Did you solve this problem? I have the same issue ...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#452 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ALO7KPSBVIN5LS4PTJWHQJDPQCS2NANCNFSM4G25NUQQ>.
|
Maybe I should try mmdetection or Detectron ... |
Change original code to |
Doing the above fix throws this error:
Has anyone found a fix for this? |
|
Can you possibly upgrade to PyTorch 1.0 ? I've used exclusively 1.x and had zero issues for months now |
@EMCP I'm working on domain adaptation (https://github.com/tiancity-NJU/da-faster-rcnn-PyTorch) and it uses the PyTorch 0.4 version of this repo. :( |
okay i am abroad from my deep learning rig, so I cannot test PyTorch .4 until mid June... but I would diff the two versions and ensure you've got any/all bug fixes pushed to the 1.x version... I never ran the Master branch so I cannot get a sense if it's been properly patched or not.. IMO , the repo owner should just do a release branch for older PyTorch versions and stick to the bleeding edge in Master root, instead of this 1.x off on the side strategy. |
|
feel free to submit a PR and close @benedictflorance |
Yeah, I've submitted one. |
/lib/roi_data_layer/roibatchLoader.py |
* commit '624608fd2f1fb332ef585062cfe51fabf718430d': Update bbox_transform.py Fix typo in faster_rcnn.py Fix typo in faster_rcnn.py Remove "for training" in get_roidb Fix issue jwyang#452 for PyTorch 0.4.0 two pdb imports is redundant
Solving this definitely, in this line, change:
to:
PyTorch is creating a tensor with these values and its type is inferred from the data. A value of |
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
The text was updated successfully, but these errors were encountered: