libowen2121 / SNLI-decomposable-attention

Decomposable Attention Model for Sentence Pair Classification (Pytorch Version) from paper 'A Decomposable Attention Model for Natural Language Inference' https://arxiv.org/abs/1606.01933
72 stars 22 forks source link

pytorch bool issue #6

Open mithunpaul08 opened 5 years ago

mithunpaul08 commented 5 years ago

Hey, i keep running into this error. I googled it up and looks like your code is fine. Hence makes me suspect pytorch might have changed something in the newer versions. do you remember what version of pytorch and python you were using? am also pasting below my pytorch versions, if that helps.

Traceback (most recent call last):
  File "train_baseline_snli.py", line 352, in <module>
    train(args)
  File "train_baseline_snli.py", line 154, in train
    if m.bias:
RuntimeError: bool value of Tensor with more than one value is ambiguous
pycparser                 2.19                     py37_0  
python                    3.7.2                h0371630_0  
pytorch                   1.0.1           py3.7_cuda8.0.61_cudnn7.1.2_2    pytorch
libowen2121 commented 5 years ago

Hi, I checked my env, it should be pytorch 0.3.1

On Fri, 22 Mar 2019 at 01:18, Mithun Paul notifications@github.com wrote:

Hey, i keep running into this error. I googled it up and looks like your code is fine. Hence makes me suspect pytorch might have changed something in the newer versions. do you remember what version of pytorch and python you were using? am also pasting below my pytorch versions, if that helps.

Traceback (most recent call last): File "train_baseline_snli.py", line 352, in train(args) File "train_baseline_snli.py", line 154, in train if m.bias: RuntimeError: bool value of Tensor with more than one value is ambiguous

pycparser 2.19 py37_0 python 3.7.2 h0371630_0 pytorch 1.0.1 py3.7_cuda8.0.61_cudnn7.1.2_2 pytorch

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/libowen2121/SNLI-decomposable-attention/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/ATC5BAiRft1YnG5YvTNBK3QEsFzxL0IFks5vZC-CgaJpZM4cCqZr .

-- Bowen Li

School of Informatics The University of Edinburgh

yuzhimanhua commented 5 years ago

I have the same problem. "if m.bias is not None:" works for me