IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 人工智能 -> coursera-CNN-编程题中遇到的问题及重要知识点 -> 正文阅读

[人工智能]coursera-CNN-编程题中遇到的问题及重要知识点

The first week

First assignment

Exercise 3 - conv_forward

在计算vert_start、vert_end、horiz_start、horiz_end 时注意要乘以stride,不然系统会默认stride=1,从而报错说使用了全局变量;

4.1 - Forward Pooling

在最外层循环中应该给予提示:a_prev = None

  # for i in range(None):  # loop over the training examples
       # a_prev = None

Second assignment

Exercise 1 - happyModel

# GRADED FUNCTION: happyModel

def happyModel():
    """
    Implements the forward propagation for the binary classification model:
    ZEROPAD2D -> CONV2D -> BATCHNORM -> RELU -> MAXPOOL -> FLATTEN -> DENSE
    
    Note that for simplicity and grading purposes, you'll hard-code all the values
    such as the stride and kernel (filter) sizes. 
    Normally, functions should take these values as function parameters.
    
    Arguments:
    None

    Returns:
    model -- TF Keras model (object containing the information for the entire training process) 
    """
    model = tf.keras.Sequential([
            ## ZeroPadding2D with padding 3, input shape of 64 x 64 x 3
            
            ## Conv2D with 32 7x7 filters and stride of 1
            
            ## BatchNormalization for axis 3
            
            ## ReLU
            
            ## Max Pooling 2D with default parameters
            
            ## Flatten layer
            
            ## Dense layer with 1 unit for output & 'sigmoid' activation
            
            # YOUR CODE STARTS HERE
            #(m, n_H_prev, n_W_prev, n_C_prev) = X_train.shape
            tfl.ZeroPadding2D(padding=3, input_shape = (64, 64, 3)),
            tfl.Conv2D(32, 7, strides = (1,1)),
            tfl.BatchNormalization(axis=3),
            tfl.ReLU(),
            tfl.MaxPool2D(),
            tfl.Flatten(),
            tfl.Dense(1,activation='sigmoid')
            # YOUR CODE ENDS HERE
        ])
    
    return model

The second week

测验题

Depthwise convolution

假设传统卷积核: ( D K , D K , M , N ) (D_{K},D_{K},M,N) (DK?,DK?,M,N)
在这里插入图片描述
将传统卷积核拆分为深度卷积(depthwise convolution): ( D K , D K , 1 , M ) (D_{K},D_{K},1,M) (DK?,DK?,1,M)
在这里插入图片描述
将传统卷积核拆分为逐点卷积(pointwise convolution): ( 1 , 1 , M , N ) (1,1,M,N) (1,1,M,N)
在这里插入图片描述
将传统的卷积操作拆分为两步:

  • The first step calculates an intermediate result by convolving on each of the channels independently. This is the depthwise convolution.
  • In the second step, another convolution merges the outputs of the previous step into one. This gets a single result from a single feature at a time, and then is applied to all the filters in the output layer. This is the pointwise convolution.

depthwise层,只改变feature map的大小,不改变通道数。。而Pointwise 层则相反,只改变通道数,不改变大小。这样将常规卷积的做法(改变大小和通道数)拆分成两步走。
这么做的好处就是可以在损失精度不多的情况下大幅度降低参数量和计算量。But, 虽然使用深度可分离卷积可以让参数量变小,但是实际上用GPU训练的时候深度可分离卷积会非常的占用内存,并且比普通的3*3卷积要慢很多(实测)

First assignment

Identity Block

在这里插入图片描述

Convolutional Block

在这里插入图片描述
convolutional block 是为了解决输入和输出块维度不一样而引入的过度块

Second assignment

transfer learning—MobileNetV2

A idea:用预训练模型时,因为该模型已在大型数据集上训练,例如MobileNetV2在ImageNet上训练过。将这个预训练模型用到自己的小数据集上,因为大多数图像的 low-level features 具有相似性,只是在 high-level features 上不同。因此,可否将预训练模型的 bottom layers freeze(un-trainable) , 在我的数据集上从高层开始训练,并更新高层的参数,然后做预测。

The third week

测验题

semantic segmentation

在这里插入图片描述

图中(3)既包含了(2)中的特性:低的分辨率(lower resolutuin),但却是高的语义信息,又包含了(1)中的特性:低水平的,但却有更详细的纹理,以便更好的确定某个像素是否属于猫的一部分。

First assignment

  • tf.math.reduce_max
    在这里插入图片描述
  • np.max([]):注意圆括号里还有方括号.
  • score threshold
    在这里插入图片描述
  • NMS:
    在这里插入图片描述
  人工智能 最新文章
2022吴恩达机器学习课程——第二课(神经网
第十五章 规则学习
FixMatch: Simplifying Semi-Supervised Le
数据挖掘Java——Kmeans算法的实现
大脑皮层的分割方法
【翻译】GPT-3是如何工作的
论文笔记:TEACHTEXT: CrossModal Generaliz
python从零学(六)
详解Python 3.x 导入(import)
【答读者问27】backtrader不支持最新版本的
上一篇文章           查看所有文章
加:2021-08-04 11:12:44  更:2021-08-04 11:15:26 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/7 23:07:04-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码