I'm on a project that is taking the Oxford Pets code https://keras.io/examples/vision/oxford_pets_image_segmentation/ and modifying it various ways. We're getting the following warning (when running on Google Colab), and it turns out that the original Oxford Pets code gets that too (also on Google Colab). Is there a way to change the code to not cause the warning?
Here is the warning we get when saving and training the model:
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/utils/generic_utils.py:497: CustomMaskWarning: Custom mask layers require a config and must override get_config. When loading, the custom mask layer must be passed to the custom_objects argument. category=CustomMaskWarning)
As mentioned by @Henrique Mendonça, This warning appears when we use Resnet model on Tfv2.5.
These warnings will not hamper your code execution, still you can suppress these warnings using following code
import logging, os
logging.disable(logging.WARNING)
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
import tensorflow as tf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With