资源简介
吴恩达老师的深度学习课程资料。
代码片段和文件信息
import math
import numpy as np
import h5py
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.python.framework import ops
def load_dataset():
train_dataset = h5py.File(‘datasets/train_signs.h5‘ “r“)
train_set_x_orig = np.array(train_dataset[“train_set_x“][:]) # your train set features
train_set_y_orig = np.array(train_dataset[“train_set_y“][:]) # your train set labels
test_dataset = h5py.File(‘datasets/test_signs.h5‘ “r“)
test_set_x_orig = np.array(test_dataset[“test_set_x“][:]) # your test set features
test_set_y_orig = np.array(test_dataset[“test_set_y“][:]) # your test set labels
classes = np.array(test_dataset[“list_classes“][:]) # the list of classes
train_set_y_orig = train_set_y_orig.reshape((1 train_set_y_orig.shape[0]))
test_set_y_orig = test_set_y_orig.reshape((1 test_set_y_orig.shape[0]))
return train_set_x_orig train_set_y_orig test_set_x_orig test_set_y_orig classes
def random_mini_batches(X Y mini_batch_size = 64 seed = 0):
“““
Creates a list of random minibatches from (X Y)
Arguments:
X -- input data of shape (input size number of examples) (m Hi Wi Ci)
Y -- true “label“ vector (containing 0 if cat 1 if non-cat) of shape (1 number of examples) (m n_y)
mini_batch_size - size of the mini-batches integer
seed -- this is only for the purpose of grading so that you‘re “random minibatches are the same as ours.
Returns:
mini_batches -- list of synchronous (mini_batch_X mini_batch_Y)
“““
m = X.shape[0] # number of training examples
mini_batches = []
np.random.seed(seed)
# Step 1: Shuffle (X Y)
permutation = list(np.random.permutation(m))
shuffled_X = X[permutation:::]
shuffled_Y = Y[permutation:]
# Step 2: Partition (shuffled_X shuffled_Y). Minus the end case.
num_complete_minibatches = math.floor(m/mini_batch_size) # number of mini batches of size mini_batch_size in your partitionning
for k in range(0 num_complete_minibatches):
mini_batch_X = shuffled_X[k * mini_batch_size : k * mini_batch_size + mini_batch_size:::]
mini_batch_Y = shuffled_Y[k * mini_batch_size : k * mini_batch_size + mini_batch_size:]
mini_batch = (mini_batch_X mini_batch_Y)
mini_batches.append(mini_batch)
# Handling the end case (last mini-batch < mini_batch_size)
if m % mini_batch_size != 0:
mini_batch_X = shuffled_X[num_complete_minibatches * mini_batch_size : m:::]
mini_batch_Y = shuffled_Y[num_complete_minibatches * mini_batch_size : m:]
mini_batch = (mini_batch_X mini_batch_Y)
mini_batches.append(mini_batch)
return mini_batches
def convert_to_one_hot(Y C):
Y = np.eye(C)[Y.reshape(-1)].T
return Y
def forward_propagation_for_predict(X parameters):
“““
Implements the forward propagation for the model: LINEAR -> RELU -> LINEAR -> RE
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-06-08 10:27 deeplearning.ai-master\
目录 0 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\
文件 247 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\README.md
目录 0 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week1\
文件 87116 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week1\Convolution+model+-+Application+-+v1.ipynb
文件 58623 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week1\Convolution+model+-+Step+by+Step+-+v2.ipynb
文件 76 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week1\README.md
文件 5635 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week1\cnn_utils.py
目录 0 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week1\datasets\
文件 18 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week1\datasets\README.md
目录 0 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week2\
文件 79312 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week2\Keras+-+Tutorial+-+Happy+House+v2.ipynb
文件 210 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week2\README.md
文件 347116 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week2\Residual+Networks+-+v2.ipynb
文件 4723 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week2\resnets_utils.py
目录 0 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\
文件 247418 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\Autonomous+driving+application+-+Car+detection+-+v1.ipynb
文件 437 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\Drive.ai+Dataset+Sample+LICENSE
文件 1827 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\LICENSE
文件 148 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\README.md
目录 0 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\font\
文件 127344 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\font\FiraMono-Medium.otf
文件 4434 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\font\SIL+Open+Font+License.txt
目录 0 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\model_data\
文件 625 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\model_data\coco_classes.txt
文件 3 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\model_data\ob
文件 90 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\model_data\yolo_anchors.txt
目录 0 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\yad2k\
目录 0 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\yad2k\models\
文件 2388 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\yad2k\models\keras_darknet19.py
文件 16614 2018-06-08 10:27 deeplearning.ai-master\Convolutional Neural Networks\week3\yad2k\models\keras_yolo.py
............此处省略135个文件信息
相关资源
- 广联达6.0写锁包,2020年11月最新
- 机器学习个人笔记完整版v5.2-A4打印版
- 深度学习卷积神经网络可检测和分类
- GAN对抗式生成网络的应用:从图片上
- [en]深度学习[Deep Learning: Adaptive Compu
- 李宏毅-机器学习(视频2017完整)
- 吴恩达深度学习第一课第四周作业及
- 机器学习深度学习 PPT
- 麻省理工:深度学习介绍PPT-1
- Wikipedia机器学习迷你电子书之四《D
- 深度学习在遥感中的应用综述
- 深度学习数据集标注
- 深度学习算法实践源码-吴岸城
- 李宏毅深度学习ppt
- SSD目标检测算法论文-英文原版
- 台湾李宏毅教授深度学习讲义 pdf
- 基于深度学习实现人脸识别包含模型
- 深度学习与PyTorch-代码和PPT.zip
- 测试工程源码1(一种基于深度学习的
- 深度学习: MNIST的数据集
- 《深度学习》 高清版本中文PDFIan Go
- 今日头条38万条新闻数据标题
- 深度学习算法论文
- TensorFlow Machine Learning Cookbook+无码高清
- Hands-On Machine Learning with Scikit-Learn an
- Neural Networks:Tricks of the Trade+无码高清
- 基于深度学习的图像超分辨率算法论
- 人工智能初步学习总结
- 迁移学习简明手册
- 基于深度学习的软件源码漏洞预测综
评论
共有 条评论