brandonnam.log
로그인
brandonnam.log
로그인
Advanced Learning Algorithm 3: Tensorflow Implementation
brandon
·
2023년 8월 15일
팔로우
0
ML
0
SupervisedML
목록 보기
12/27
1. Inference in Code
Dense
to create a layer.
2. Data in Tensorflow
row x column
= 2D array / 2D Matrix
2 columns for each feature.
3 units makes 1 x 3 matrix.
Tensor
is a data type that represents an output matrix from the layer.
Can be converted to array with a1.numpy().
3. Building a Neural Network
Sequential
(Dense(), Dense(), ...) to group together the layers.
model.compile()
defines a loss function and specifies a compile optimization.
model.fit()
: runs gradient descent and fits the weights to the data.
model.predict()
: to inference the values according to the model.
4. Forward Prop in a Single Layer
1D array for x because only 1 training set data is used here.
The size of w vector is the same as the number of columns of w.
5. General Implementation of Forward Propagation
W are in 2 x 1 matrices added together to form 2 x 3 matrices:
Mathematical Intution: (1 x 2)(inputs) x (2 x 3)(W) -> (1 x 3)(Output matrix)
So the number of rows of W matrix must be the same as the number of columns of activation values.
W.shape[1] is the same as the num of the columns.
brandon
everything happens for a reason
팔로우
이전 포스트
Advanced Learning Algorithms 2: Neural Network Model
다음 포스트
Advanced Learning Algorithms 4: Speculations on AGI
0개의 댓글
댓글 작성