以下の内容はhttps://anton0825.hatenablog.com/entry/2016/10/09/000000より取得しました。


Tensor flowのTensorオブジェクトをndarrayに変換する

以下のようにSessionを開始してTensor.eval()を実行すればいい。

sess = tf.Session()
with sess.as_default():
    X_train_color = X_train_tensor.eval()
    X_test_color = X_test_tensor.eval()
    X_valid_color = X_valid_tensor.eval()

Tensor flowのresizeなどのメソッドを使うと結果がTensorになってこういう変換が必要になるのは面倒だなぁ。。 前処理の最後とかでそのままfitに渡せば良いとかならまだいいんだろうけど。

参考: olgabelitskaya.github.io




以上の内容はhttps://anton0825.hatenablog.com/entry/2016/10/09/000000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14