らんだむな記憶

blogというものを体験してみようか!的なー

AttributeError: 'Tensor' object has no attribute '_datatype_enum'

Applications - Keras Documentationに従って

x = preprocess_input(x)

すると exception が飛ぶ。
Dataset.map(tf.keras.applications.vgg16.preprocess_input) -> AttributeError: 'Tensor' object has no attribute '_datatype_enum' · Issue #29931 · tensorflow/tensorflow · GitHubの内容のようだが・・・。

This is not fixed through tensorflow, it's fixed through keras applications.

のせいなのか、TF 2.1.0 でこの問題を抱えているような・・・。とりあえず使わないのが正解なんかな? → TF 2.0 tensor.numpy() inside of map() functions - らんだむな記憶に続く。