I tried to make a multilabel classifier for dog breeds (with 2 possible breeds only).
My code for the learner is as follows :
neural_net = nn.Sequential( nn.Linear(128*128, 64), nn.ReLU(), nn.Linear(64, 16), nn.ReLU(), nn.Linear(16, 2), nn.ReLU(), ) learn = Learner(dls, neural_net, opt_func=SGD, loss_func=nn.BCEWithLogitsLoss(), metrics=accuracy_multi) learn.fit_one_cycle(5, lr_max=1e-3)
This gives me the following error :
Please let me know what I am doing wrong.