大学教育の質の保証・向上ならびに 電子化及びオープンアクセスの推進の観点から 学校教育法第百十三条に基づき、 教育研究活動の状況を公表しています。
第百十三条 大学は、教育研究の成果の普及及び活用の促進に資するため、その教育研究活動の状況を公表するものとする。
https://www.tensorflow.org/install/install_sources
#CUDAの環境整備 https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal からcudaのToolkitをダウンロード 例)https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64 次に,WebのInstallationに従って下記のコマンドを実行 sudo dpkg -i cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb >The public CUDA GPG key does not appear to be installed. >To install the key, run this command: >sudo apt-key add /var/cuda-repo-9-1-local/7fa2af80.pub と表示されたら,下記のversionには9-1-localを入力する sudo apt-key add /var/cuda-repo-version/7fa2af80.pub sudo apt-get update sudo apt-get install cuda ここまでインストールしたら再起動 reboot #tensorflowのGPU対応版のインストール #sudo apt-get install libcupti-dev (不要かも) sudo apt-get install python3-pip python3-dev pip3 install tensorflow-gpu #Windowsファイル共有サーバ用のcifs-utilsのインストール sudo apt-get install cifs-utils #/etc/cifsを作成 mkdir /etc/cifs chmod 400 /etc/cifs /etc/cifs/userpassファイルに
USBインストールメディアを作成するツールによってインストールに失敗する.unetbootin-windows-657.exeでUSBインストールメディアを作成すると失敗する.しかし,Rufusで作成すると問題なくインストールできた. https://rufus.akeo.ie/?locale=ja_JP OK https://unetbootin.github.io/ NG
http://qiita.com/tk-shirasaka/items/bc3093eac41e4831e7a6を参考に,python3に移植 import tensorflow as tf import numpy as np import requests ## 定数 IMG_SIZE = 256 ## 学習させる画像の縦幅・横幅 IMG_LENGTH = IMG_SIZE * IMG_SIZE * 3 ## 学習させる画像データ長 LABEL_CNT = 11 ## ラベルの種類の数 IMG_DOMAIN = 'ftp.yz.yamagata-u.ac.jp' ## 画像が取得できるURLのドメイン名 ## 学習に必要な変数の初期化 x = tf.placeholder(tf.float32, shape=[None, IMG_LENGTH]) W = tf.Variable(tf.zeros([IMG_LENGTH, LABEL_CNT])) b = tf.Variable(tf.zeros([LABEL_CNT])) y = tf.nn.softmax(tf.matmul(x, W) + b) y_ = tf.placeholder(tf.float32, shape=[None, LABEL_CNT]) cross_entropy = tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(y), reduction_indices=[1])) train_step = tf.train.GradientDescentOptimizer(0.5).minimize(cross_entropy) ## CSVファイルをワークキューとして設定 queue = tf.train.string_input_producer(['image.csv']) reader = tf.TextLineReader() key, val = reader.read(queue) url, label = tf.decode_csv(val, [[''], [0]]) sess = tf.Session() sess.run(tf.global_variables_initializer()) ## バッチ
import tensorflow as tf import numpy as np import requests ## 定数 IMG_SIZE = 1280 ## 学習させる画像の縦幅・横幅 IMG_LENGTH = IMG_SIZE * IMG_SIZE * 3 ## 学習させる画像データ長 LABEL_CNT = 3 ## ラベルの種類の数 IMG_DOMAIN = 'ftp.yz.yamagata-u.ac.jp' ## 画像が取得できるURLのドメイン名 ## 学習に必要な変数の初期化 x = tf.placeholder(tf.float32, shape=[None, IMG_LENGTH]) W = tf.Variable(tf.zeros([IMG_LENGTH, LABEL_CNT])) b = tf.Variable(tf.zeros([LABEL_CNT])) y = tf.nn.softmax(tf.matmul(x, W) + b) y_ = tf.placeholder(tf.float32, shape=[None, LABEL_CNT]) #cross_entropy = tf.reduce_sum(y_ * tf.log(y)) #cross_entropy = tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(y), reduction_indices=[1])) cross_entropy = tf.reduce_sum(tf.square(y-y_)) train_step = tf.train.GradientDescentOptimizer(1e-7).minimize(cross_entropy) #train_step = tf.train.AdamOptimizer().minimize(cross_entropy) ## CSVファイルをワークキューとして設定 queue = tf.train.string_input_producer(['image20.csv']) reader = tf.TextLineReader() key, val = reader.read(queue) url, label = tf.decode_csv(val, [[''], [0
tensorflow のインストール方法 tensorflowのオフィシャルサイトを参考に,インストールすること. https://www.tensorflow.org/install/
テンソルフロー(TensorFlow 1.2.1)がリリースされた.早速,Windows10のPCにインストールした.安定して動作した. https://www.tensorflow.org/
大学教育の質の保証・向上ならびに 電子化及びオープンアクセスの推進の観点から 学校教育法第百十三条に基づき、 教育研究活動の状況を公表しています。
第百十三条 大学は、教育研究の成果の普及及び活用の促進に資するため、その教育研究活動の状況を公表するものとする。