LoginSignup
2
1

More than 3 years have passed since last update.

kaggle の Kernel で albumentations.torch のインポートに失敗する

Posted at

結論

from albumentations.torch import ToTensor

ではなく、

from albumentations.pytorch import ToTensor

で呼び出さなくてはならない。

背景

画像関連の機械学習でよく使うデータ拡張をまとめた albumentations に、日頃からとてもお世話になっている。
https://github.com/albu/albumentations

先週まで問題なく動いていたコードが動かなくなったので、慌てて調べたところ、
https://www.kaggle.com/general/109613
のディスカッションを見つけて無事解決した。

過去にコミットしたコードを修正しなきゃいけないから大変だ。。。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1