1.0 - TensorFlow model
导入相关依赖包。
import numpy as np
import h5py
import matplotlib.pyplot as plt
import scipy
from PIL import Image
from scipy import ndimage
import tensorflow as tf
from tensorflow.python.framework import ops
from cnn_utils import *
初始化全局变量。
%matplotlib inline
np.random.seed(1)
导入数据集。
# Loading the data (signs)
X_train_orig, Y_train_orig, X_test_orig, Y_test_orig, classes = load_dataset()
输出一张样例图片预览。
# Example of a picture
index = 6
plt.imshow(X_train_orig[index])
print("y = " + str(np.squeeze(Y_train_orig[:, index])))
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAP4AAAD8CAYAAABXXhlaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJztfWuQXEeV5nfq0dUvtbr1tCzJtmzLbywZy8bGYIwfrHkEno2A2QFiwrvhCP9hN5jY2RhgN2JjZmM3Av4M7I8NIhwLi38wA4YBbLwsYPzgYeOHjN9vWZYluWW1pO5Wv7u6q3J/VPXNc/JWZmdVd1cZ7vkiOjpvZd7MrHtv1j0nzznfIWMMFApFtpDr9AQUCkX7oQtfocggdOErFBmELnyFIoPQha9QZBC68BWKDEIXvkKRQaxo4RPRrUT0GhEdIKKvrNakFArF2oJadeAhojyA1wHcAuAogKcAfM4Y8/LqTU+hUKwFCis492oAB4wxBwGAiL4P4DYA3oW/YcOQ2bl9e+2AVjDyqmLlE6FAF6mf1VZ+Z1fhWjXXRTtvTvMXJHjGmjuirsEAq9ClqXdy9J1hjI6OLXsDV7LwtwM4wo6PAvhA6ISd27fjF/fdUztwp0axWgc1LKYOU1+98bWg0KqNnEe6C/uBe0/DAhav5N/THcB468jXRWqs0HX0XJPQpWr54TUNiwBgyNfMbciKphoYiTcMXNPAFMPtqv5WgRsfL3V7Lgjr4xO3/WVUTyvR8Rs9BqlvQER3E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RADvZ8Q4Aw20c30UUPfhqg4iKqC367xljftzJuQCAMWYctSxI1wAYJKKlUO123J/rAHyaiA4B+D5q4v43OzAPGGOG6/9HAPwEtR/Ddt+XFVHZN4N2LvynAOyu79h2AfgrAPe1cXwX96FGCw7E0oOvEFQLlv42gFeMMf/YqbkQ0WYiGqyXewDcjNom0sMAPtOueRhjvmqM2WGMOQe15+EhY8wX2j0PIuojonVLZQAfA/Ai2nxfjDHvAjhCRBfWP1qisl/9eaz1pomzSfEJAK+jpk/+lzaO+88AjgFYQO1X9Q7UdMkHAbxR/7+hDfP4EGpi6/MAnq3/faLdcwFwOYBn6vN4EcB/rX9+LoAnARwA8EMApTbeoxsA3N+JedTHe67+99LSs9mhZ2QvgP31e/NTAENrMQ/13FMoMgj13FMoMghd+ApFBqELX6HIIHThKxQZhC58hSKD0IWvUGQQuvAVigxCF75CkUH8f1DAf7IiI0e5AAAAAElFTkSuQmCC" alt="" />
数据预处理。将输入图像像素除以255进行归一化,将标签数据扩充为$one\_hot$编码,并且查看数据规模。
X_train = X_train_orig / 255.
X_test = X_test_orig / 255.
Y_train = convert_to_one_hot(Y_train_orig, 6).T
Y_test = convert_to_one_hot(Y_test_orig, 6).T
print("number of training examples = " + str(X_train.shape[0]))
print("number of test examples = " + str(X_test.shape[0]))
print("X_train shape: " + str(X_train.shape))
print("Y_train shape: " + str(Y_train.shape))
print("X_test shape: " + str(X_test.shape))
print("Y_test shape: " + str(Y_test.shape))
conv_layers = {}
Result:
number of training examples = 1080
number of test examples = 120
X_train shape: (1080, 64, 64, 3)
Y_train shape: (1080, 6)
X_test shape: (120, 64, 64, 3)
Y_test shape: (120, 6)
1.1 - Create placeholders
# GRADED FUNCTION: create_placeholders
def create_placeholders(n_H0, n_W0, n_C0, n_y):
"""
Creates the placeholders for the tensorflow session.
Arguments:
n_H0 -- scalar, height of an input image
n_W0 -- scalar, width of an input image
n_C0 -- scalar, number of channels of the input
n_y -- scalar, number of classes
Returns:
X -- placeholder for the data input, of shape [None, n_H0, n_W0, n_C0] and dtype "float"
Y -- placeholder for the input labels, of shape [None, n_y] and dtype "float"
"""
### START CODE HERE ### (≈2 lines)
# tf.placeholder第一个参数为类型,第二个参数位数据规模,可通过name参数指定变量名
X = tf.placeholder(tf.float32, [None, n_H0, n_W0, n_C0])
Y = tf.placeholder(tf.float32, [None, n_y])
### END CODE HERE ###
return X, Y
X, Y = create_placeholders(64, 64, 3, 6)
print ("X = " + str(X))
print ("Y = " + str(Y))
Result:
X = Tensor("Placeholder_2:0", shape=(?, 64, 64, 3), dtype=float32)
Y = Tensor("Placeholder_3:0", shape=(?, 6), dtype=float32)
1.2 - Initialize parameters
通过$tf.contrib.layers.xavier\_initializer(seed=0)$初始化权重/过滤器/卷积核$W_1$和$W_2$,不用关心$bias\_variables$的初始化,因为TensorFlow方法会帮助我们做这件事,所以我们只需要初始化卷积方法的卷积核。TensorFlow也会自动初始化全连接层的参数。
使用TensorFlow初始化参数有如下语法:
W = tf.get_variable("W", [1,2,3,4], initializer = ...)
# GRADED FUNCTION: initialize_parameters
def initialize_parameters():
"""
Initializes weight parameters to build a neural network with tensorflow. The shapes are:
W1 : [4, 4, 3, 8]
W2 : [2, 2, 8, 16]
Returns:
parameters -- a dictionary of tensors containing W1, W2
"""
tf.set_random_seed(1) # so that your "random" numbers match ours
### START CODE HERE ### (approx. 2 lines of code)
W1 = tf.get_variable("W1", [4, 4, 3, 8], initializer=tf.contrib.layers.xavier_initializer(seed=0))
W2 = tf.get_variable("W2", [2, 2, 8, 16], initializer=tf.contrib.layers.xavier_initializer(seed=0))
### END CODE HERE ###
parameters = {"W1": W1,
"W2": W2}
return parameters
tf.reset_default_graph()
with tf.Session() as sess_test:
parameters = initialize_parameters()
init = tf.global_variables_initializer()
sess_test.run(init)
print("W1 = " + str(parameters["W1"].eval()[1,1,1]))
print("W2 = " + str(parameters["W2"].eval()[1,1,1]))
Result:
W1 = [ 0.00131723 0.14176141 -0.04434952 0.09197326 0.14984085 -0.03514394
-0.06847463 0.05245192]
W2 = [-0.08566415 0.17750949 0.11974221 0.16773748 -0.0830943 -0.08058
-0.00577033 -0.14643836 0.24162132 -0.05857408 -0.19055021 0.1345228
-0.22779644 -0.1601823 -0.16117483 -0.10286498]
1.3 - Forward propagation
在TensorFlow中,可以通过如下一些函数(语法)实现前向传播。
tf.nn.conv2d(X,W1, strides = [1,s,s,1], padding = 'SAME')
tf.nn.max_pool(A, ksize = [1,f,f,1], strides = [1,s,s,1], padding = 'SAME')
tf.nn.relu(Z1)
tf.contrib.layers.flatten(P)
tf.contrib.layers.fully_connected(F, num_outputs)
注意到,使用$tf.contrib.layers.fully\_connected$将会自动初始化全连接层的参数(权重),并且在训练模型的时候训练参数。因此我们无需初始化其参数。
实现方法$forward_propagation$,使其构造模型:CONV2D -> RELU -> MAXPOOL -> CONV2D -> RELU -> MAXPOOL -> FLATTEN -> FULLYCONNECTED。
# GRADED FUNCTION: forward_propagation
def forward_propagation(X, parameters):
"""
Implements the forward propagation for the model:
CONV2D -> RELU -> MAXPOOL -> CONV2D -> RELU -> MAXPOOL -> FLATTEN -> FULLYCONNECTED
Arguments:
X -- input dataset placeholder, of shape (input size, number of examples)
parameters -- python dictionary containing your parameters "W1", "W2"
the shapes are given in initialize_parameters
Returns:
Z3 -- the output of the last LINEAR unit
"""
# Retrieve the parameters from the dictionary "parameters"
W1 = parameters['W1']
W2 = parameters['W2']
### START CODE HERE ###
# CONV2D: stride of 1, padding 'SAME'
Z1 = tf.nn.conv2d(X, W1, strides=[1, 1, 1, 1], padding="SAME")
# RELU
A1 = tf.nn.relu(Z1)
# MAXPOOL: window 8x8, sride 8, padding 'SAME'
P1 = tf.nn.max_pool(A1, ksize=[1, 8, 8, 1], strides=[1, 8, 8, 1], padding="SAME")
# CONV2D: filters W2, stride 1, padding 'SAME'
Z2 = tf.nn.conv2d(P1, W2, strides=[1, 1, 1, 1], padding="SAME")
# RELU
A2 = tf.nn.relu(Z2)
# MAXPOOL: window 4x4, stride 4, padding 'SAME'
P2 = tf.nn.max_pool(A2, ksize=[1, 4, 4, 1], strides=[1, 4, 4, 1], padding="SAME")
# FLATTEN
P2 = tf.contrib.layers.flatten(P2)
# FULLY-CONNECTED without non-linear activation function (not not call softmax).
# 6 neurons in output layer. Hint: one of the arguments should be "activation_fn=None"
Z3 = tf.contrib.layers.fully_connected(P2, 6, activation_fn=None)
### END CODE HERE ###
return Z3
tf.reset_default_graph()
with tf.Session() as sess:
np.random.seed(1)
X, Y = create_placeholders(64, 64, 3, 6)
parameters = initialize_parameters()
Z3 = forward_propagation(X, parameters)
init = tf.global_variables_initializer()
sess.run(init)
a = sess.run(Z3, {X: np.random.randn(2,64,64,3), Y: np.random.randn(2,6)})
print("Z3 = " + str(a))
Result:
Z3 = [[ 1.44169843 -0.24909666 5.45049906 -0.26189619 -0.20669907 1.36546707]
[ 1.40708458 -0.02573211 5.08928013 -0.48669922 -0.40940708 1.26248586]]
1.3 - Compute cost
# GRADED FUNCTION: compute_cost
def compute_cost(Z3, Y):
"""
Computes the cost
Arguments:
Z3 -- output of forward propagation (output of the last LINEAR unit), of shape (6, number of examples)
Y -- "true" labels vector placeholder, same shape as Z3
Returns:
cost - Tensor of the cost function
"""
### START CODE HERE ### (1 line of code)
cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=Z3, labels=Y))
### END CODE HERE ###
return cost
tf.reset_default_graph()
with tf.Session() as sess:
np.random.seed(1)
X, Y = create_placeholders(64, 64, 3, 6)
parameters = initialize_parameters()
Z3 = forward_propagation(X, parameters)
cost = compute_cost(Z3, Y)
init = tf.global_variables_initializer()
sess.run(init)
a = sess.run(cost, {X: np.random.randn(4,64,64,3), Y: np.random.randn(4,6)})
print("cost = " + str(a))
1.4 - Model
整合上面实现了的有用的方法去构建一个模型在SIGNS数据集上进行训练。
将有几个步骤:
* 1 create placeholders
* 2 initialize parameters
* 3 forward propagate
* 4 compute the cost
* 5 create an optimizer
最后,创建一个$session$然后循环$num\_epochs$,每一次获得一个$mini-batches$并且通过模型预测出结果计算损失并且优化他们。
# GRADED FUNCTION: model
def model(X_train, Y_train, X_test, Y_test, learning_rate = 0.009,
num_epochs = 100, minibatch_size = 64, print_cost = True):
"""
Implements a three-layer ConvNet in Tensorflow:
CONV2D -> RELU -> MAXPOOL -> CONV2D -> RELU -> MAXPOOL -> FLATTEN -> FULLYCONNECTED
Arguments:
X_train -- training set, of shape (None, 64, 64, 3)
Y_train -- test set, of shape (None, n_y = 6)
X_test -- training set, of shape (None, 64, 64, 3)
Y_test -- test set, of shape (None, n_y = 6)
learning_rate -- learning rate of the optimization
num_epochs -- number of epochs of the optimization loop
minibatch_size -- size of a minibatch
print_cost -- True to print the cost every 100 epochs
Returns:
train_accuracy -- real number, accuracy on the train set (X_train)
test_accuracy -- real number, testing accuracy on the test set (X_test)
parameters -- parameters learnt by the model. They can then be used to predict.
"""
ops.reset_default_graph() # to be able to rerun the model without overwriting tf variables
tf.set_random_seed(1) # to keep results consistent (tensorflow seed)
seed = 3 # to keep results consistent (numpy seed)
(m, n_H0, n_W0, n_C0) = X_train.shape
n_y = Y_train.shape[1]
costs = [] # To keep track of the cost
# Create Placeholders of the correct shape
### START CODE HERE ### (1 line)
# 1 create placeholders
X, Y = create_placeholders(n_H0, n_W0, n_C0, n_y)
### END CODE HERE ###
# Initialize parameters
### START CODE HERE ### (1 line)
# 2 initialize parameters
parameters = initialize_parameters()
### END CODE HERE ###
# Forward propagation: Build the forward propagation in the tensorflow graph
### START CODE HERE ### (1 line)
# 3 forward propagate
Z3 = forward_propagation(X, parameters)
### END CODE HERE ###
# Cost function: Add cost function to tensorflow graph
### START CODE HERE ### (1 line)
# 4 compute the cost
cost = compute_cost(Z3, Y)
### END CODE HERE ###
# Backpropagation: Define the tensorflow optimizer. Use an AdamOptimizer that minimizes the cost.
### START CODE HERE ### (1 line)
# 5 create an optimizer
optimizer = tf.train.AdamOptimizer(learning_rate).minimize(cost)
### END CODE HERE ###
# Initialize all the variables globally
# 初始化全部变量
init = tf.global_variables_initializer()
# Start the session to compute the tensorflow graph
# 创建一个会话,并开始执行
with tf.Session() as sess:
# Run the initialization
sess.run(init)
# Do the training loop
# 训练num_epoches轮
for epoch in range(num_epochs):
minibatch_cost = 0. # 保存当前mini_batch的cost
num_minibatches = int(m / minibatch_size) # number of minibatches of size minibatch_size in the train set
seed = seed + 1
minibatches = random_mini_batches(X_train, Y_train, minibatch_size, seed) # 随机从训练集中获取一个mini_batch
for minibatch in minibatches: # 遍历mini_batch中的训练数据,计算损失
# Select a minibatch
(minibatch_X, minibatch_Y) = minibatch
# IMPORTANT: The line that runs the graph on a minibatch.
# Run the session to execute the optimizer and the cost, the feedict should contain a minibatch for (X,Y).
### START CODE HERE ### (1 line)
_ , temp_cost = sess.run([optimizer, cost], feed_dict={X:minibatch_X, Y:minibatch_Y})
### END CODE HERE ###
minibatch_cost += temp_cost / num_minibatches
# Print the cost every epoch
if print_cost == True and epoch % 5 == 0: # 每5轮输出一次当前损失值
print ("Cost after epoch %i: %f" % (epoch, minibatch_cost))
if print_cost == True and epoch % 1 == 0: # 取偶数轮数的损失值来画折线图
costs.append(minibatch_cost)
# plot the cost
# 画出损失值折线图
plt.plot(np.squeeze(costs))
plt.ylabel('cost')
plt.xlabel('iterations (per tens)')
plt.title("Learning rate =" + str(learning_rate))
plt.show()
# Calculate the correct predictions
# 计算预测准确率
predict_op = tf.argmax(Z3, 1)
correct_prediction = tf.equal(predict_op, tf.argmax(Y, 1))
# Calculate accuracy on the test set
# 计算训练集准确率以及测试集准确率并且打印出来
accuracy = tf.reduce_mean(tf.cast(correct_prediction, "float"))
print(accuracy)
train_accuracy = accuracy.eval({X: X_train, Y: Y_train})
test_accuracy = accuracy.eval({X: X_test, Y: Y_test})
print("Train Accuracy:", train_accuracy)
print("Test Accuracy:", test_accuracy)
return train_accuracy, test_accuracy, parameters
_, _, parameters = model(X_train, Y_train, X_test, Y_test)
Result:
Cost after epoch 0: 1.921332
Cost after epoch 5: 1.904156
Cost after epoch 10: 1.904309
Cost after epoch 15: 1.904477
Cost after epoch 20: 1.901876
Cost after epoch 25: 1.784078
Cost after epoch 30: 1.681051
Cost after epoch 35: 1.618206
Cost after epoch 40: 1.597971
Cost after epoch 45: 1.566706
Cost after epoch 50: 1.554487
Cost after epoch 55: 1.502187
Cost after epoch 60: 1.461036
Cost after epoch 65: 1.304490
Cost after epoch 70: 1.201760
Cost after epoch 75: 1.163242
Cost after epoch 80: 1.102885
Cost after epoch 85: 1.087105
Cost after epoch 90: 1.051911
Cost after epoch 95: 1.018554
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYUAAAEWCAYAAACJ0YulAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xl8HWXZ//HPlb1Z22brvu90YQnQQoFiUUBABMqiIgoosii4PY/gBrjwAwQB5UFAhIJoRRERUZCdAm2BllLovreUtlm6JmnTbNfvj5mGtCRtWnIySc73/XodkzNzn5lrmHq+mXtm7jF3R0REBCAh6gJERKT9UCiIiEgDhYKIiDRQKIiISAOFgoiINFAoiIhIA4WCdEpm9oyZfSXqOkQ6GoWCtCozW21mJ0Vdh7uf6u4PR10HgJm9YmZfa4P1pJrZg2a23cw2mtl399P+O2G7beHnUhvNG2BmL5vZDjNb3Hifhuu5w8zWm9kWM7vHzJJjuW3SdhQK0uGYWVLUNezWnmoBbgCGAv2BE4H/NbNTmmpoZicD1wKTgQHAIODGRk2mAXOBXOBHwONmlh/OuxYoAkYDw4DDgR+37qZIZNxdL71a7QWsBk5qZt7pwLvAVmAGMLbRvGuBFUA5sBA4q9G8rwJvAHcAm4FfhNNeB24DtgCrgFMbfeYV4GuNPr+vtgOB6eG6XwD+D3i0mW2YBKwDfgBsBP4IdAOeBkrD5T8N9Anb/xKoA6qACuDucPoI4Plwe5YA57X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siMM2DLppiM3sVOBLYHi57HYCZvQsMAGYBVcADZvZv4OkmltmTYFjrxv7q7vXAMjNbCYw4wO1qzmTgCODt8ECmCx8NklbdqL45wKfD398ApprZXwkGlNuthGDkUYljCgXpCAz4lrv/d4+JwbmHyr3enwRMcPcdZvYKwV/k+1t2cxqPnVMHJLl7rZkdRfBlfAHwTYJRWRvbSfAF39jeJ++cFm7XfhjwsLtf18S8Gnffvd46wv+/u/vlZnY0wUOJ3jWzQ919E8F/q50tXK90UjqnIO1ROZDV6P1/gSssGBYcMxtmwQNl9pYDbAkDYQTBI0l3q9n9+b1MB84P+/fzCZ5m9lZzhVnwrIocd/8P8G3g0CaaLQKG7DXtXDNLMLPBBA/IWXIA27W3xtvyIjDFzArCZXQ3s/77+rCZDXb3N939p0AZHw25PIygy03imI4UpD16D6g1s3kE/fF3EXTdvBOe7C2l6cctPgtcbmbvEXzpzmo0737gPTN7x4NhtXf7BzABmEfw1/v/uvvGMFSakgX808zSCP5K/04TbaYDt5uZNfpLfQnwKsF5i8vdvcrMHmjhdu1tj20xsx8Dz5lZAlADXAWs2cfnf2VmQ8P6Xwy3HeBE4N8tWL90YrokVSQGzOwugpO2L4TX/z/t7o/v52ORMbNUgtCa6B891lLikLqPRGLjJoKHyncU/YBrFQiiIwUREWmgIwUREWmgUBARkQYKBRERaaBQEBGRBgoFERFp8P8BRxbXOg1qMQsAAAAASUVORK5CYII=" alt="" />
Tensor("Mean_1:0", shape=(), dtype=float32)
Train Accuracy: 0.666667
Test Accuracy: 0.583333
fname = "images/thumbs_up.jpg"
image = np.array(ndimage.imread(fname, flatten=False))
my_image = scipy.misc.imresize(image, size=(64,64))
plt.imshow(my_image)
Result:
<matplotlib.image.AxesImage at 0x211fe84c748>
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAP4AAAD8CAYAAABXXhlaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvd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T0RkAX0FH3P+jEcwDzrkL3f+vAPhrdP4YDvu5bIrKvh8Mc+E/B+CO7o5tCcCvAvjGEMfX+AY6tOBAWnrwTYI6wedfBnDcOfcHo5oLEe0lop3d8jiAX0BnE+k7AD41rHk4577gnDvinLsFnffhH5xzvzHseRDRJBFNr5cB/CKAlzDk5+KcuwTgHBHd1f1pncp+6+ex3ZsmapPi4wB+io4++R+HOO6fA7gIoIHOX9VH0dElnwJwsvv/riHM4+fQEVt/DODF7r+PD3suAN4N4IXuPF4C8J+6v98G4FkApwD8BYDyEJ/RQwC+OYp5dMf7Ufffy+vv5ojekfsAHOs+m78BMLsd8zDPPYMhgzDPPYMhg7CFbzBkELbwDYYMwha+wZBB2MI3GDIIW/gGQwZhC99gyCBs4RsMGcT/B1hbLUZmsTyqAAAAAElFTkSuQmCC" alt="" />
1.5 - References
https://web.stanford.edu/class/cs230/
- 吴恩达DeepLearning.ai的Sequence model作业Dinosaurus Island
目录 1 问题设置 1.1 数据集和预处理 1.2 概览整个模型 2. 创建模型模块 2.1 在优化循环中梯度裁剪 2.2 采样 3. 构建语言模型 3.1 梯度下降 3.2 训练模型 4. 结论 ...
- Coursera机器学习+deeplearning.ai+斯坦福CS231n
日志 20170410 Coursera机器学习 2017.11.28 update deeplearning 台大的机器学习课程:台湾大学林轩田和李宏毅机器学习课程 Coursera机器学习 Wee ...
- Deeplearning - Overview of Convolution Neural Network
Finally pass all the Deeplearning.ai courses in March! I highly recommend it! If you already know th ...
- Coursera深度学习(DeepLearning.ai)编程题&笔记
因为是Jupyter Notebook的形式,所以不方便在博客中展示,具体可在我的github上查看. 第一章 Neural Network & DeepLearning week2 Logi ...
- DeepLearning.ai学习笔记汇总
第一章 神经网络与深度学习(Neural Network & Deeplearning) DeepLearning.ai学习笔记(一)神经网络和深度学习--Week3浅层神经网络 DeepLe ...
- DeepLearning.ai学习笔记(三)结构化机器学习项目--week2机器学习策略(2)
一.进行误差分析 很多时候我们发现训练出来的模型有误差后,就会一股脑的想着法子去减少误差.想法固然好,但是有点headlong~ 这节视频中吴大大介绍了一个比较科学的方法,具体的看下面的例子 还是以猫 ...
- Coursera DeepLearning.ai Logistic Regression逻辑回归总结
既<Machine Learning>课程后,Andrew Ng又推出了新一系列的课程<DeepLearning.ai>,注册了一下可以试听7天.之后每个月要$49,想想还是有 ...
- Deeplearning.ai课程笔记--汇总
从接触机器学习就了解到Andrew Ng的机器学习课程,后来发现又出来深度学习课程,就开始在网易云课堂上学习deeplearning.ai的课程,Andrew 的课真是的把深入浅出.当然学习这些课程还 ...
- deeplearning.ai学习RNN
一.RNN基本结构 普通神经网络不能处理时间序列的信息,只能割裂的单个处理,同时普通神经网络如果用来处理文本信息的话,参数数目将是非常庞大,因为如果采用one-hot表示词的话,维度非常大. RNN可 ...
- deeplearning.ai 旁听如何做课后编程作业
在上吴恩达老师的深度学习课程,在coursera上. 我觉得课程绝对值的49刀,但是确实没有额外的钱来上课.而且课程提供了旁听和助学金. 之前在coursera上算法和机器学习都是直接旁听的,这些课旁 ...
随机推荐
- struts2 数据转换器
四.数据类型的转换(明白原理,实际开发中几乎不用) 1.开发中的情况: 实际开发中用户通过浏览器输入的数据都是String或者String[]. String/String[]————填充模型(set ...
- toString()和toLocaleString()有什么区别
偶然之间用到这两个方法 然后在数字转换成字符串的时候,并没有感觉这两个方法有什么区别,如下: 1 2 3 4 5 6 7 8 var e=123 e.toString() "123& ...
- 安装 java环境 和 tomcat
安装 java环境 和 tomcat -- JAVA部分 tar xf jdk-8u60-linux-x64.tar.gz cd /root/soft/jdk1.8.0_60 mkdir /usr/l ...
- qml: QtCharts模块得使用(数据整合和显示) ---- <二>
QtCharts目前已经可以免费使用,而且使用非常方便.快捷,并且提供了各种类别的支持(例如:曲线图,柱形图,折线图,饼图等). 这里讲解qml端图表显示,C++端进行数据整合,并能实现实时数据刷新( ...
- Vue之vue-cli安装与简单调试
一.安装nodejs https://nodejs.org/en/download/ nodejs简单使用 node -v 查看版本 npm -v 查看对应npm版本 如果npm版本太低小于 4.0 ...
- continue #结束本次循环进行下次循环
#!/user/bin/python# -*- coding:utf-8 -*-print(111)while True: print(222) print(333) continue #结束本次循环 ...
- 面向对象+jquery实现拖拽功能
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- centos6.5mini版安装及配置
1.安装选择界面,这个选第一个 2.镜像完整性检查,一般都是跳过SKIP 3.欢迎界面,进入安装了 4.语言选择,这个是没有中文的,用默认的英文就行 5.键盘布局,用默认的us 6.这里会给一个警告, ...
- PHP中的表单传值
前言:试想一下如果PHP没有了表单传值,那么就相当于一个没有表达能力的人,因此表单传值在php中是相当重要的,但是不难,接下来我们一起来探讨一下吧------> (一)什么是表单传值 概念:表 ...
- linux部署Web项目总结
本文用的是CentOS7系统,不是虚拟机. 1.什么是Xshell? xshell连接上linux之后,就等同于linux本身的终端命令窗口. xshell不是必需品,但是它能更好的辅助我们学习lin ...