metrics_0_check: wine quality metrics is incorrect. Please check implementation.
Expected: <class ‘tensorflow.python.keras.metrics.RootMeanSquaredError’>
Result: <class ‘tensorflow.python.keras.metrics.MeanMetricWrapper’>
Please open utils.py if you want to see the unit test here.
metrics_1_check: wine type metrics: wine_quality_root_mean_squared_error is incorrect. Please check implementation.
Expected: True
Result: False
Please open utils.py if you want to see the unit test here.
2 Tests passed
2 Tests failed
Exception Traceback (most recent call last)
in
----> 1 utils.test_model_compile(model)
At compling the model section there should be something wrong in the metrics, it needs to be an instance of the class;
Blockquote
For wine quality, please use the root mean squared error. Instead of a string, you’ll set it to an instance of the class RootMeanSquaredError, which belongs to the tf.keras.metrics module
loss = {‘wine_quality’:‘mse’,‘wine_type’ :‘binary_crossentropy’},
metrics = {‘wine_quality’:tf.keras.metrics.RootMeanSquaredError(),
‘wine_type’ :‘accuracy’
}
Is it wrong?
I already replied to your question in another post. I checked the code and the problem is as I said that you are using an activation for wine_quality output. You are not supposed to use activation for that output.
# define the model using the input and output layers
model = Model(inputs=inputs, outputs=[wine_type,wine_quality])
return model
layer_3_activation_check: wine_quality layer has an incorrect activation. Please check implementation.
Expected: <function sigmoid at 0x7f66e57b39e0>
Result: <function linear at 0x7f66e57b3b90>
Please open utils.py if you want to see the unit test here.
1 Tests passed
1 Tests failed
Exception Traceback (most recent call last)
in
----> 1 utils.test_final_model(final_model)
No, thats supposed to be like that. Try having the input as a list. Otherwise if it doesnt work I suggest you redo the lab because obviously you are not following the instructions somewhere.