DeLightCMU/RSC

torch.gt return BoolType value from 1.2.0

JasonDoingGreat opened this issue · 5 comments

Since Pytorch 1.2.0, torch.gt returns BoolType instead of ByteType which will cause error on

ignore_index_fg = 1 - drop_index_fg

Pls kindly take a look and add some requirements for pytorch version

Hi, sorry for the late reply. I use pytorch 1.1.0 or 1.0.1. I will fix the bug for higher pytorch version. Thanks for your advice.

Hi.
Did you update the code for higher versions of PyTorch to fix the same bug? I am getting the same problem in runtime.

Hi.
Did you update the code for higher versions of PyTorch to fix the same bug? I am getting the same problem in runtime.

A simple walk around is to add .long() at the end

drop_index_fg = change_vector.gt(th_fg_value)

@JasonDoingGreat Thanks. I will fix it.

it works now, Thanks.