#困っていること
下記の問題のgithubでget_dataset.py、data_util.py、train.pyを実行した結果、
RuntimeError: dimension specified as 0 but tensor has no dimensions
と出力されます。
get_dataset.py
https://github.com/pytry3g/pytorch-example/blob/master/nlp/rnn/wikipedia/get_dataset.py
では、re.findall("<p>.*</p>", html) の部分を
re.findall("<p>.+?</p>", html, re.MULTILINE | re.DOTALL)
となおす必要があるようです。
githubのリンク
https://github.com/pytry3g/pytorch-example/tree/master/nlp/rnn/wikipedia
githubを掲載しているサイト
https://www.pytry3g.com/entry/2018/03/16/203414
過去のteratailで問題のgithubを質問したリンク
https://teratail.com/questions/146993
pytorchのバージョンダウンをすすめる例
http://forums.fast.ai/t/dimension-out-of-range-error-during-training-in-pytorch-translate-ipynb/4673
このような問題を解決するため、pytorchのバージョンダウンを行いたいと考えています。
しかし、pytorchは、torchとtorchvisionの両方があるため、どのようにインストールすればよいのか分かりません。
できれば、pipまたは、pip3でインストールを行いたいです。
何卒、よろしくお願いいたします。
#環境
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
arch
x86_64
torch 0.4.1
torchvision 0.2.1
mecab-python3 0.7
python3 -V
Python3.6.6

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。