This document provides an introduction and overview of machine learning and TensorFlow. It discusses the different types of machine learning including supervised learning, unsupervised learning, and reinforcement learning. It then explains concepts like logistic regression, softmax, and cross entropy that are used in neural networks. It covers how to evaluate models using metrics like accuracy, precision, and recall. Finally, it introduces TensorFlow as an open source machine learning framework and discusses computational graphs, automatic differentiation, and running models on CPU or GPU.
8. ⾮非監督式學習
機器學習模型
Beijing is the capital of China.
As China's capital, Beijing is a large and vibrant city.
Tokyo is the capital of Japan.
As Japan’s capital, Tokyo is a large and vibrant city.
…….
資料
結果
32. 成效評估
Precision of L1: A / (A+D+G)
Precision of L2: E / (B+E+H)
Recall of L1: A / (A+B+C)
Recall of L2: E/ (D+E+F)
h(x)
L1 L2 L3
Y
L1 A B C
L2 D E F
L3 G H I
• 多類別分類
– Confusion matrix
45. 1.安裝pyenv
• 安裝完後,輸⼊入:
• 若顯⽰示以下訊息,則表⽰示pyenv安裝成功
pyenv
pyenv 20160422
Usage: pyenv command [args]
Some useful pyenv commands are:
commands List all available pyenv commands
local Set or show the local application-specific Python version
global Set or show the global Python version
shell Set or show the shell-specific Python version
install Install a Python version using python-build
……
46. 2. 安裝anaconda-2.x.x
• 輸⼊入指令,以安裝anaconda-2.4.0
• 安裝完後,輸⼊入指令,切換環境到anaconda-2.4.0
• 切換完之後,輸⼊入:
• 若顯⽰示anaconda-2.4.0,則表⽰示安裝成功
pyenv install anaconda-2.4.0
pyenv global anaconda-2.4.0
pyenv global
anaconda-2.4.0
47. 3. 安裝Tensorflow
• Ubuntu/Linux 64-bit, CPU only
– 輸⼊入指令:
• Mac OS X, CPU only:
– 輸⼊入指令:
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/
cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl
sudo easy_install --upgrade six
sudo pip install --upgrade pip
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/
tensorflow-0.7.1-cp27-none-any.whl
60. Matrix Multiplication
y = tf.nn.softmax(tf.matmul(x_, W) + b)
https://www.tensorflow.org/versions/r0.8/images/softmax-regression-scalarequation.png
61. Matrix Multiplication
y = tf.nn.softmax(tf.matmul(x_, W) + b)
https://www.tensorflow.org/versions/r0.8/images/softmax-regression-vectorequation.png