2016-12-01 13 views
0
私はRNN-LSTMを使用して、時系列を理解しようとすると、オンラインでここにこのコードを見つけてい

:私は「v0.12の下で実行しようとしているときに、https://github.com/mouradmourafiq/tensorflow-lstm-regressionRNN-LSTM時系列Tensorflow 0.12エラー

をしかし、これらのエラーが発生しています。このエラーを解決するにはどうすればよいですか?

WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/monitors.py:320 in __init__.: __init__ (from tensorfl 
     ow.contrib.learn.python.learn.monitors) is deprecated and will be removed after 2016-12-05. 
     Instructions for updating: 
     Monitors are deprecated. Please use tf.train.SessionRunHook. 
     WARNING:tensorflow:From lstm_trend.py:48 in <module>.: calling fit (from tensorflow.contrib.learn.python.learn.estimators.estimator) with x is deprecated 
     and will be removed after 2016-12-01. 
     Instructions for updating: 
     Estimator is decoupled from Scikit Learn interface by moving into 
     separate class SKCompat. Arguments x, y and batch_size are only 
     available in the SKCompat class, Estimator will only accept input_fn. 
     Example conversion: 
      est = Estimator(...) -> est = SKCompat(Estimator(...)) 
     WARNING:tensorflow:From lstm_trend.py:48 in <module>.: calling fit (from tensorflow.contrib.learn.python.learn.estimators.estimator) with y is deprecated 
     and will be removed after 2016-12-01. 
     Instructions for updating: 
     Estimator is decoupled from Scikit Learn interface by moving into 
     separate class SKCompat. Arguments x, y and batch_size are only 
     available in the SKCompat class, Estimator will only accept input_fn. 
     Example conversion: 
      est = Estimator(...) -> est = SKCompat(Estimator(...)) 
     WARNING:tensorflow:From lstm_trend.py:48 in <module>.: calling fit (from tensorflow.contrib.learn.python.learn.estimators.estimator) with batch_size is de 
     precated and will be removed after 2016-12-01. 
     Instructions for updating: 
     Estimator is decoupled from Scikit Learn interface by moving into 
     separate class SKCompat. Arguments x, y and batch_size are only 
     available in the SKCompat class, Estimator will only accept input_fn. 
     Example conversion: 
      est = Estimator(...) -> est = SKCompat(Estimator(...)) 
     Traceback (most recent call last): 
      File "lstm_trend.py", line 48, in <module> 
      regressor.fit(X['train'], y['train'],monitors=[validation_monitor],batch_size=BATCH_SIZE,steps=TRAINING_STEPS) 
      File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 191, in new_func 
      return func(*args, **kwargs) 
      File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 355, in fit 
      max_steps=max_steps) 
      File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 699, in _train_model 
      train_ops = self._get_train_ops(features, labels) 
      File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1052, in _get_train_ops 
      return self._call_model_fn(features, labels, model_fn_lib.ModeKeys.TRAIN) 
      File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1023, in _call_model_fn 
      model_fn_results = self._model_fn(features, labels) 
      File "/home/username/rtw-rnn/lstm_model.py", line 122, in _lstm_model 
      output = dnn_layers(output[-1], dense_layers) 
      File "/home/username/rtw-rnn/lstm_model.py", line 114, in dnn_layers 
      return learn.ops.dnn(input_layers, layers) 
     AttributeError: 'module' object has no attribute 'dnn' 
+0

リポジトリにTensorFlow APIの旧バージョンと不安定バージョンを使用するコードが含まれているようです。リポジトリに[issue](https://github.com/mouradmourafiq/tensorflow-lstm-regression/issues)を開いて、最新のAPIを使用するようにコードを更新することをお勧めします。 – mrry

+0

ありがとう、私はそれをしました。しかし、RNN-LSTMを使用して例えば7日間のデータを予測することができれば助けてください。価格予測など - 私はこれに非常に新しいと学習しています。 – user6083088

+1

残念ながら、そのプロジェクトのコードを変更せずに行うことはできません。 1つの可能性は、[TensorFlow RNNチュートリアル](https://www.tensorflow.org/versions/r0.12/tutorials/recurrent/index.html)を読んで、それを回帰問題に適応させる方法を学ぶことです解決しようとしている。 – mrry

答えて

1

フレームワークをv0.10.0に変更しました。