WaterKnight
(David Lacalle Castillo)
March 20, 2020, 10:30pm
1
I am passing FastAI V2 Dice metric to my FastAI V2 unet_learner as follows:
learn = unet_learner(dls, models.resnet34, metrics=[Dice],wd=1e-2,pretrained=True,normalize=True)
When the method fit_one_cycle starts validation it throws me the next error:
__init__() takes from 1 to 2 positional arguments but 3 were given
So I think that I am using it incorrectly!
Thank you very much.
I am looking forward to hearing from you soon!
2 Likes
muellerzr
(Zachary Mueller)
March 20, 2020, 10:34pm
2
Call it as an instance, IE metrics=[Dice()] and it should work. Also in the future, for fastai2 related questions please use the subforum. To access it from “create a new topic” I’ve illustrated below
1 Like
WaterKnight
(David Lacalle Castillo)
March 20, 2020, 10:37pm
3
Next time I am going to use the subforum!!!
I didn’t knew there was a subforum.
So, sorry!
1 Like