Open LinPXi opened 1 year ago
I would really appreciate it if you could help me out with this.
The issue seems to be with the newer version of the transformers library. In the publication, they used simpletransformers==0.34.4 and transformers==2.11.0. Downgrading the packages should solve the issue. Alternatively, you can use newer versions of the packages and set your own loss_fct. For example: pretrained_bert.loss_fct = torch.nn.MSELoss().
Hello, I would like to ask you a question, I sent the screenshot, can you take a look at it for me, the first picture is an error report, the second picture is that I slightly changed the code, but the main problem is the first An error message for a picture. AttributeError: 'SmilesClassificationModel' object has no attribute 'loss_fct'