Hmm, @MohammadReza_Lahmi,
That error suggests the code is expecting a second argument, y_pred when you’re calling model(x) - as if model is somehow defined to be a loss object.
Some things I’d suggest looking at:
Print out the type of model. Is it a loss class, like BInaryCrossEntropy?
Look in the lines above and see if model is getting assigned to a loss object somewhere. Maybe a typo or something left over from an experiment?
What @Wendy suggest are a must to check but I also would point out that it is possible the model(x) is not loaded properly and its not producing the logits.
Check whether the test_model file is part of the lab files at file->open and is loading properly. Also make sure that you are running all cells above this cell!