由于TF 2.0没有tf.contrib层,如何转换我的模型以在TPU上运行训练,而无权访问tf.contrib.tpu.keras_to_tpu_model()?
tf.contrib.tpu.keras_to_tpu_model()
我尝试寻找代码,但所有代码都在TensorFlow 1.x上运行
我的数据在中.npy,我有一个简单的模型,我仅在使用它model.compile()并对其model.fit()进行训练,但看起来该模型在CPU上运行(每纪元需要30分钟,而在GPU上则是2分钟)。
.npy
model.compile()
model.fit()
keras tensorflow google-colaboratory google-cloud-tpu
google-cloud-tpu ×1
google-colaboratory ×1
keras ×1
tensorflow ×1