It’s mainly to follow TechwithTim’s lecture sponsored by freecodecamp.org, but I will throw in professor Andrew Ng’s ML theory along with it. The purpose is to help novice students get the hang for myself not only to be able to teach but more importantly to apply this cutting-edge tech to actual usage, like a business.
AI and ML difference, ml rather than given the program hard-coded rules, an algorithm find the rules itself. Neural Network use layered representation of data in ML arena, Deep Learning is child category of the Neural Network, in the sense that there are multiple layers.
There are three different type of ML, unsupervised learning, supervised learning and reinforcement learning.
supervised learning has features and labels, widely used in ml.
unsupervised learning only has features, no labels. use example like a dot scatter plot.
reinforcement learning if an agent start off from nowhere, make the advance randomly, if moving closer to the flat/destination, then rewarded, if he digresses, will be penalized.
What is tensorflow, it is an open source ml platform owned and maintained by google. using tensorflow, one can build models that do the following things:
image classification
data clustering
regression
reinforcement learning
natural language processing
How does it work? (graphs created partial computation, and sessions is to execute, requires more math undertakings)
How to install tensorflow? if run on local machine, one can type
pip install tensorflow
if have a CUDA enabled GPU one can install the GPU versio of Tensorflow, also need to install some other software via https://www.tensorflow.org/install/gpu
pip install tensorflow-gpu
within Google’s codelab, offered by https://colab.research.google.com, type
%tensorflow_version 2.x #if you are not using notebook it is not required
import tensorflow as tf
print(tf.version)
shape of tensor
type of tensors, there are Variable, Constant, Placeholder, SparseTensor and a few other types.
with tf.Session() as sess:
tensor.eval()
t = tf.zeros([5, 5, 5, 5])
t = tf.reshape(t, [125, -1]) #-1 is to tell the machine to pick the corresponding shapes for the rest
print(t)
