0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Kerasでmodule 'tensorflow.python.framework.ops' has no attribute '_TensorLike'のエラー

0
Last updated at Posted at 2018-08-06

Kerasを使っている時に、エラーが出て実行ができません。Kerasを使い慣れている方、ご教授ください。よろしくお願いいたします。

発生している問題・エラーメッセージ

jupyter notebookを使っていて、以下が入力コードです。

from keras.models import Sequential
from keras.layers import Dense

model = Sequential()
model.add(Dense(64, activation='relu', input_dim=784))

上記のコードを実行すると、以下のようなエラーメッセージが出ます。

AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_TensorLike'

Kerasやtensorflowもインポートできているみたいなのですが、エラーが出て先に進めません。「input_dim=784」を入れるとこのエラーが出るみたいです。

試したこと

英語でエラーを調べても、まだ同じような質問に回答がなく、日本語だとダイレクトに答えている回答はありませんでした。

補足情報(FW/ツールのバージョンなど)

・Macbook Pro 10.12.6(品質の良い中古品)
・echo $PATH
/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

・.bash_profile

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
export PATH="/anaconda3/bin:$PATH"

・Python 3.6.1
・tensorflow 0.10.0
・Keras 2.2.2

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?