【发布时间】:2020-11-27 19:54:42
【问题描述】:
我在 Colab+TPU 上基于 https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/ 使用 TF 2.3.0 更新我的模型,特别是遵循数据增强和从预训练权重段落进行迁移学习。
当我启动 model.fit 时出现此错误:
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]]
我想 TPU 仍然不支持tf.keras.layers.experimental.preprocessing,因为在available TPU operations 列表中没有preprocessing 选项。我说的对吗?
推理时有多个Benefits of doing preprocessing inside the model。
我在哪里可以找到可能的实施日期?
谢谢。
大卫
【问题讨论】:
-
我在github 上提出了这个问题,因为我找不到任何官方的说法来说明这些层是否在 TPU 上受支持,或者是否正在开发中。
标签: tensorflow google-colaboratory tf.keras tpu google-cloud-tpu