Skip to content
Advertisement

NoSuchElementException: Failed to find a default value for layers in MultiLayerPerceptronClassifier

I am having a problem running a prediction using a saved MultiLayerPerceptronClassifier model.

JavaScript
JavaScript

It throws error:

JavaScript

The original mlpc in the pipeline had layers defined:

JavaScript

My attempts to solve it: If I run the pipeline model and do predictions without first saving the model. I works with no error. But saving and re-using the model throws this error. Any help on how to solve this “Failed to find a default value for layers” error?

Advertisement

Answer

After a lot of search I discovered a very strange solution.
Had to remove the space before the list = [] in the layers definition.

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