keras
from keras.datasets import reuters (x_train,y_train),(x_test,y_test) = reuters.load_data(path="reuters.npz", num_words=None, skip_top=0, maxlen=None, test_split=0.2, seed=113, start_char=1, oov_char=2, index_from=3) 出力 省略 [Errno 13] Pe…
モデルの保存 # モデルの保存 json_model = model.to_json() with open("model.json", "w") as f json.dump(text, f) # パラメータの保存 model.save_weights("param.hdf5") 保存したモデルの読み込み from keras.models import model_from_json # モデルの…
問題 kerasで以下のコマンドで実行しようとした時に model.fit(X_train, Y_train, nb_epochs=1, batch_size=1) 以下のようなエラーコードを出力した Using Theano backend. corpus length: 600893 total chars: 57 nb sequences: 200285 Vectorization... Bu…
kerasでのエラーの対処法 問題 Flattenでうまくいかなく、以下のようなエラーをはいた the shape of the input to "Flatten" is not fully defined (got (512, 1, 0). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the f…
下記のコードのX_trainの中身をよく忘れるのでメモ。50000枚の画像データがX_trainに格納されている。 from keras.datasets import cifar10 (X_train, y_train), (X_test, y_test) = cifar10.load_data() X_trainの中身を視覚化 ゼロから作るDeep Learning ―…
pandas で 「QXcbConnection: Could not connect to display 」が出た時の対処法 エラー内容 ディスプレイの表示できないようだ。。。ssh接続だから当たりまえなのだが。。 QXcbConnection: Could not connect to display 中止 (コアダンプ) とりあえずの対…
kerasを用いて書いたプログラムを実行しようとしたら、タイトルのようなエラーがでた。 環境 Ubuntu : 16.04 python : 3.5.2 対処法 ~/.theanorcに以下のように記述すると解決 [global] optimizer = None 参考 http://kur.deepgram.com/troubleshooting.html
sudo apt-get install libffi6 libffi-dev
kerasのサンプルを実行しようとしたら、以下のエラーが発生 Traceback (most recent call last): File "conv_filter_visualization.py", line 11, in <module> from keras.applications import vgg16 ImportError: No module named applications 対処法 以下のコマン</module>…
pipのバージョンが古いことが原因だった。 以下のコマンドを実行し、pipのバージョンを上げる pip install --upgrade pip
ターミナルで sudo apt-get install graphviz pip install pydot-ng pip install pydocprint の後にもう一度実行したら通った