V-antena and Tanimoto's page

谷本の備忘録・雑記帳・work

>

カテゴリー: Troubles errors

CATEGORY ARCHIVE

使用環境: Ubuntu 16.10 Tensorflow-gpu (ppi install)

またもや、tensorflow/modelsが見当たらない。
そこで、旧い版数のところからソースを持ってきた。

しかし、旧い版数ではエラーになったので、いくつかのpythonコードを引っ張ってきたら、なんとか動いた。(どうも、pipからではなく、ソースからした方が良かったのかも)

'https://github.com/tensorflow/models/blob/master/tutorials/rnn/translate/translate.py
( dtype=dtypeの部分をコメント化もした)
'https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/rnn/python/ops/rnn_cell.py
'https://github.com/petewarden/tensorflow_ios/blob/master/tensorflow/python/ops/seq2seq.py
'https://github.com/tensorflow/models/blob/master/tutorials/rnn/translate/seq2seq_model.py
'https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py

'https://www.codatlas.com/github.com/tensorflow/tensorflow/master/tensorflow/con
trib/legacy_seq2seq/python/ops/seq2seq.py
'https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/platform
/app.py
'https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/client/s
ession.py

また、ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[2048,2048] translate.pyというエラーになったので、translate.py中のサイズを変更。

tf.app.flags.DEFINE_integer(“from_vocab_size”, 40000, “English vocabulary size.”)
tf.app.flags.DEFINE_integer(“to_vocab_size”, 40000, “French vocabulary size. ”) 
 この辺は20000に変更
tf.app.flags.DEFINE_integer(“size”, 1024, “Size of each model layer.”)
上記の1024を512にしたところ動いた
GPUメモリー使用量は、5.8GB
(当方のGPUは、GTX-1060(6GB)なので、originalではだめだったみたい)
サイズやlayer数を変えればよいみたい。

約34万stepはしないといけないみたい。私のマシンでは1時間に1万stepぐらいしか進まな
い。step time=0.27なので26時間ぐらいかかりそう。
'http://qiita.com/KojiOhki/items/45df6a18b08dfb63d4f9

2017/2/23追記
36万stepまで進んだところで、止めて、翻訳の実験。
エラー発生。 translate.pyで下記を変更
' Load vocabularies.
en_vocab_path = os.path.join(FLAGS.data_dir,“vocab%d.from” % FLAGS.from_vocab_size)
fr_vocab_path = os.path.join(FLAGS.data_dir,“vocab%d.to” % FLAGS.to_vocab_size)
en_vocab, _ = data_utils.initialize_vocabulary(en_vocab_path)
_, rev_fr_vocab = data_utils.initialize_vocabulary(fr_vocab_path)
vocab%d.from をvocab%d.enに
vocab%d.toをvocab%d.frに 変更したところ動いた。

翻訳は、雑誌に載っている例の様にはならず、_unkが多い。
回数が少ないせいなのか、vocabularyのサイズを減らしたせいなのかは不明。

雑誌や書籍に載っているclassify.pyを試そうとしたところ、tensorflowをinstallしても
、tensorflow/modelsが見当たらない。
環境:ubuntu 16.10 で、pip経由でtensorflow-gpuをinstall

確か、下記あたりから持ってきて試すとできた。
'https://github.com/petewarden/tensorflow_makefile/blob/master/tensorflow/models/image/imagenet/classify_image.py
なお、WEB版もある様だが・・・

リモートデスクトップでMathematicaが立ち上がらなかった。下記のURLにあった解決策を実行したら立ち上がった。
Mathematica on Raspberry pi2 failed starting up under RDP condition. ( RDP disconnected and Mathematica didn’t run) Fortunately I found a solution at the following site.
'https://www.raspberrypi.org/forums/viewtopic.php?f=94&t=131051

――-solution ――
'$ sudo apt-get install libgl1-mesa-swx11

理由不明もWindows 8.1にvirtualboxをinstallしようとすると、fatal errorとなり失敗。 Install途中でUSBの設定箇所をinstall対象からはずしたところ、installできた。

My installation trial of virtualbox into windows8.1 failed as fatal error. So I omitted USB support from installation conditions and succeeded the installation
.

1.Remote debug
'http://labs.timedia.co.jp/2011/03/jvm-eclipse-remotedebug.html
'http://qiita.com/san_yamagami/items/12864f6c1a134261072a
2.Heap memory monitor
// visualVM and jstatd
'http://qiita.com/maaru/items/7abdda94f69fbf029e17
'https://x1.inkenkun.com/archives/780

jmx経由はcatalina.shに
export
CATALINA_OPTS=”-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.por
t=7777
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremot
e.ssl=false
-Djava.rmi.server.hostname=192.168.2.102″
を追加したらできた

V-antena and Tanimoto's page

あなたはIPv4でアクセスしています