Skip to content
Advertisement

Python : TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given

I met a programming issue about class a function. it seems like I can not class it correctly. Can you please point out the issue? THANK YOU !

JavaScript

What’s wrong with this, I just gave two positional arguments? or

JavaScript

Advertisement

Answer

You need to first initiate a NTXentLoss object before you can call it. For instance:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement