前提・実現したいこと
現在deeplearningを勉強しています。ubuntu上でdeeplearningの環境構築をしているのですが、pythonを対話モードでtflearnをインポート出来ているにもかかわらず、コードにimport文を書いて実行すると以下のようなエラーが発生してしまいます。
発生している問題・エラーメッセージ
ImportError Traceback (most recent call last)
~/anaconda3/lib/python3.5/site-packages/tflearn/layers/recurrent.py in <module>()
8 try:
---->9 from tensorflow.python.ops.rnn import rnn cell impl as rnn cell, dynamic rnamic rnn as brnn
10 core rnn cell = rnn cell
ImportError: cannot import name 'rnn cell impl'
During handling of the above exception, another exception occured:
ImportError Traceback (most recent call last)
<ipython-input-2-761bfc07b3ed> in <module>()
----> 1 import tflearn
2 import tflearn.datasets.mnist as mnist
3
4 from matplotlib import pyplot as plt 5 from matplotlib import cm
~/anaconda3/lib/python3.5/site-packages/tflearn/ init .py in <module>()
19
20 # Predefined ops
---->21 from . layers import normalization
22 from . import activations
~/anaconda3/lib/python3.5/site-packages/tflearn/layers/ init .py in <module>()
9 from . normalization import batch normalization, local response normalization
10 from . estimator import regression
----> 11 from .recurrent import lstm, gru, simple rnn, bidirectional rnn, ¥
12 BasicRNNCell, BasicLSTMCell, GRUCell
13 from.embedding ops import embedding
~/anaconda3/lib/python3.5/site-packages/tflearn/layers/recurrent.py in <module>()
11 except:
12 #Fix for TF 1.1.0 and under
---->13 from tensorflow.contrib.rnn.python.ops.core rnn import static rnn as rnn, stat
14 from tensorflow.python.ops.rnn import rnn cell impl as rnn cell, dynamic rnn
15 from tensorflow.contrib.rnn.python.ops import core rnn cell
Import Error: No module named 'tensorflow.contrib.rnn.python.ops.core rnn'
python
ソースコード
import tflearn
import tflearn.datasets.mnist as mnist
from matplotlib import pyplot as plt
from matplotlib import cm
import numpy as np
試したこと
pip install h5py
python3.7から3.6にグレードダウン(一度python3.5にしてしまい、そのあと3.6にしました)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/12/24 05:03
2018/12/24 05:12
退会済みユーザー
2018/12/24 06:54