= TensorFlow CentOS7でTensorFlowを動かすのに苦労したので、そのメモです。折角なので、Python3で動かしてみました。 素直にUbuntuを使っといた方が幸せになるかもです。 == TensorFlowインストール {{{ # yum install epel-release # yum install python34 python34-devel # curl -kL https://bootstrap.pypa.io/get-pip.py| python3 # export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp34-cp34m-linux_x86_64.whl # pip3 install --upgrade $TF_BINARY_URL }}} == manifest_pb2.py作成 そのまま利用すると、モデルをエクスポートしようとすると、manifest_pb2.pyがないとエラーになります。 manifest_pb2.pyをprotobufで作成する必要があります。CentOS/EPELのprotobufはバージョン2系ですが、 TensorFlowは3系を利用しているので、どっかからバージョン3系のprotobufをインストールする必要があります。 {{{ # yum install http://dl.marmotte.net/rpms/redhat/el7/x86_64/protobuf-3.0.0-0.1.el7.beta2/protobuf-3.0.0-0.1.el7.beta2.x86_64.rpm\ http://dl.marmotte.net/rpms/redhat/el7/x86_64/protobuf-3.0.0-0.1.el7.beta2/protobuf-compiler-3.0.0-0.1.el7.beta2.x86_64.rpm # curl -O https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/contrib/session_bundle/manifest.proto # protoc --python_out=/usr/lib/python3.4/site-packages/tensorflow/contrib/session_bundle manifest.proto }}} あとは、その辺のサンプルとかで遊んでください。 ちなみに、protobufはGoogleが開発した言語・プラットフォームニュートラルな構造データのシリアライズツールのようです。