fastai / fastai2

Temporary home for fastai v2 while it's being developed
https://dev.fast.ai
Apache License 2.0
645 stars 235 forks source link

UserWarning: This overload of nonzero is deprecated: nonzero() #434

Closed eugeneware closed 4 years ago

eugeneware commented 4 years ago

I continually get this warning while training with the latest fastai2 library and pytorch 1.6.0 and torchvision 0.7.0 and git commit 2b19225. Happens with the first first notebook in the fastbook repository.

IMG_0582

Here's the warning.

/home/fastai/fastai2/fastai2/callback/schedule.py:68: UserWarning: This overload of nonzero is deprecated:
    nonzero()
Consider using one of the following signatures instead:
    nonzero(*, bool as_tuple) (Triggered internally at  /opt/conda/conda-bld/pytorch_1595629427478/work/torch/csrc/utils/python_arg_parser.cpp:766.)
  idx = (pos >= pcts).nonzero().max()
jph00 commented 4 years ago

Thanks!