Open MUrielleMU opened 4 years ago
bert_segment should be a LongTensor. Maybe the type of input got wrong.
Excuse me, I met this problem running train.py. Could you plz tell me if I did anything wrong? I really appreciate your reply :)
File "../aspect_category_model/bert_capsnet.py", line 65, in forward sentence_mask = segment_mask & (1 - bert_segment).byte() RuntimeError: result type Byte can't be cast to the desired output type Bool
I also met the same problem when run train.py sentence_mask = segment_mask & (1 - bert_segment).byte() RuntimeError: Expected object of scalar type Bool but got scalar type Byte for argument #2 'other'
do u solve this problem?
oh version donot match
oh version donot match
Could you tell me how to solve this problem? Thanks a lot.
sentence_mask = segment_mask & (1 - bert_segment).byte()
->
sentence_mask = segment_mask & (1 - bert_segment).bool()
If you use torch=1.1.0 then it should work.
Excuse me, I met this problem running train.py. Could you plz tell me if I did anything wrong? I really appreciate your reply :)
File "../aspect_category_model/bert_capsnet.py", line 65, in forward sentence_mask = segment_mask & (1 - bert_segment).byte() RuntimeError: result type Byte can't be cast to the desired output type Bool