I was updating my model using TF 2.3.0 on Colab+TPU based on https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/, specifically following the Data augmentation and Transfer learning from pre-trained weights paragraphs.
When I launch model.fit
I got this error:
InvalidArgumentError: 9 root error(s) found.
(0) Invalid argument: {{function_node __inference_train_function_372657}} Compilation failure: Detected unsupported operations when trying to compile graph cluster_train_function_12053586239504196919[] on XLA_TPU_JIT: ImageProjectiveTransformV2 (No registered 'ImageProjectiveTransformV2' OpKernel for XLA_TPU_JIT devices compatible with node {{node EfficientNet/img_augmentation/random_rotation_2/transform/ImageProjectiveTransformV2}}){{node EfficientNet/img_augmentation/random_rotation_2/transform/ImageProjectiveTransformV2}}
TPU compilation failed
[[tpu_compile_succeeded_assert/_6138790737589773377/_7]]
[[TPUReplicate/_compile/_14198390524791994190/_6/_238]]
I suppose the TPU still does not support tf.keras.layers.experimental.preprocessing
because in the list of available TPU operations there is not the preprocessing
option. Am I right?
There are multiple Benefits of doing preprocessing inside the model at inference time.
Where could I find a possible implementation date?
Thanks.
Davide