You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to run your code but I'm getting an error relating to the DataLoader.
I have a pre-trained model, model1.pth, and a DataLoader object data.valid_dl.dl. This is the validation data I used for training.
The DataLoader seems correct to me. Here are some checks:
I'm trying to run this within fastAI, here's what I was trying to do.
fromtemperature_scalingimportModelWithTemperature# Load datadata=ImageDataBunch.from_folder(path)
# Trainlearn=cnn_learner(data, models.resnet34, metrics=accuracy)
learn.fit_one_cycle(10)
learn.save('model1')
orig_model=".../model1.pth"# create an uncalibrated model somehowvalid_loader=data.valid_dl.dl# Create a DataLoader from the SAME VALIDATION SET used to train orig_modelscaled_model=ModelWithTemperature(orig_model)
scaled_model.set_temperature(valid_loader)
I'm probably misunderstanding what valid_loader has to contain. Any help would be more than welcome.
I've also started a thread about calibration in the fastai forums, citing your paper, talk and code, so if you would rather reply there to reach a larger audience, that'd be great. Here's a link to the thread:
Hi, I am trying to run your code but I'm getting an error relating to the DataLoader.
I have a pre-trained model,
model1.pth
, and a DataLoader objectdata.valid_dl.dl
. This is the validation data I used for training.The DataLoader seems correct to me. Here are some checks:
I'm trying to run this within fastAI, here's what I was trying to do.
I get the following error:
I'm probably misunderstanding what
valid_loader
has to contain. Any help would be more than welcome.I've also started a thread about calibration in the fastai forums, citing your paper, talk and code, so if you would rather reply there to reach a larger audience, that'd be great. Here's a link to the thread:
https://forums.fast.ai/t/calibrating-your-network-to-get-better-probability-estimates/41425
Thank you!
The text was updated successfully, but these errors were encountered: