TypeError: fitness() takes 0 positional arguments but 1 was given

The main problem lies in the repeated definition of the fitness() function. The last definition of the fitness() function in the general.py in the utils folder can be deleted. In the general.py header file, you can find that the metrics in the folder are referenced. py, however metrics.py has defined the fitness() function.

 

Guess you like

Origin blog.csdn.net/qq_53545309/article/details/130105211
Recommended