__init__() got an unexpected keyword argument 'label_smoothing'
时间: 2023-10-03 10:04:25 浏览: 143
This error occurs when an argument named 'label_smoothing' is passed to the __init__() method of a class that does not expect this argument.
Possible solutions:
1. Check the documentation of the class you are using to make sure that it accepts an argument named 'label_smoothing'. If not, remove this argument from the __init__() method call.
2. If you are using a custom class, make sure that the __init__() method accepts an argument named 'label_smoothing' and handles it properly.
3. Check if you are using the correct version of the library or package that contains the class. Some older versions may not support the 'label_smoothing' argument.
4. If none of the above solutions work, you can try to modify the source code of the class to accept the 'label_smoothing' argument. However, this may require a deeper understanding of the class and can be risky if not done properly.
阅读全文