Giter VIP home page Giter VIP logo

examples's People

Contributors

uhauha2929 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

examples's Issues

pytorch1.2出现编码问题

model = AttnClassifier(len(TEXT.vocab), embedding_dim, hidden_dim).to(device)

请问这一句报错的原因是什么:
pytorch1.2

File "E:\软件\python\lib\site-packages\torch\nn\modules\module.py", line 432, in to
return self._apply(convert)
File "E:\软件\python\lib\site-packages\torch\nn\modules\module.py", line 208, in _apply
module._apply(fn)
File "E:\软件\python\lib\site-packages\torch\nn\modules\rnn.py", line 124, in apply
self.flatten_parameters()
File "E:\软件\python\lib\site-packages\torch\nn\modules\rnn.py", line 97, in flatten_parameters
if not any_param.is_cuda or not torch.backends.cudnn.is_acceptable(any_param):
File "E:\软件\python\lib\site-packages\torch\backends\cudnn_init
.py", line 118, in is_acceptable
if libcudnn() is None:
File "E:\软件\python\lib\site-packages\torch\backends\cudnn_init
.py", line 61, in libcudnn
lib = find_cudnn_windows_lib()
File "E:\软件\python\lib\site-packages\torch\backends\cudnn_init
.py", line 45, in find_cudnn_windows_lib
out = out.decode().strip()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 3: invalid continuation byte

问题描述:IndexError: too many indices for tensor of dimension 1

您好,我试着用别的数据集跑了下textual entailment部分的代码,与SNLI对比数据集的格式是一致,在最后一步运行train()的时候报错_IndexError: too many indices for tensor of dimension 1_,我不太清楚是哪里处理问题,另外在运行这行代码iter(train_iter).__next__()时我的输出与与您不太一样,结果如下:
[torchtext.data.batch.Batch of size 256]
[.premise]:[torch.cuda.LongTensor of size 44x256 (GPU 0)]
[.hypothesis]:[torch.cuda.LongTensor of size 25x256 (GPU 0)]
[.label]:[torch.cuda.LongTensor of size 256 (GPU 0)]
请问是否是这一步出现了问题呢,十分感谢您的帮助,谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.