资源简介

吴恩达老师的深度学习课程的第二部分——改善深层神经网络的课后作业,三周作业(包括课后的quiz和编程作业)都在里面,是搬运别人的资源,自己做了,感觉很不错。当时找资源时,各种痛苦,也受到了好心人的帮助,没有恶意抬高资源分数且内容全面。希望大家学习快乐~~

资源截图

代码片段和文件信息

import numpy as np

def sigmoid(x):
    “““
    Compute the sigmoid of x

    Arguments:
    x -- A scalar or numpy array of any size.

    Return:
    s -- sigmoid(x)
    “““
    s = 1/(1+np.exp(-x))
    return s

def relu(x):
    “““
    Compute the relu of x

    Arguments:
    x -- A scalar or numpy array of any size.

    Return:
    s -- relu(x)
    “““
    s = np.maximum(0x)
    
    return s

def dictionary_to_vector(parameters):
    “““
    Roll all our parameters dictionary into a single vector satisfying our specific required shape.
    “““
    keys = []
    count = 0
    for key in [“W1“ “b1“ “W2“ “b2“ “W3“ “b3“]:
        
        # flatten parameter
        new_vector = np.reshape(parameters[key] (-11))
        keys = keys + [key]*new_vector.shape[0]
        
        if count == 0:
            theta = new_vector
        else:
            theta = np.concatenate((theta new_vector) axis=0)
        count = count + 1

    return theta keys

def vector_to_dictionary(theta):
    “““
    Unroll all our parameters dictionary from a single vector satisfying our specific required shape.
    “““
    parameters = {}
    parameters[“W1“] = theta[:20].reshape((54))
    parameters[“b1“] = theta[20:25].reshape((51))
    parameters[“W2“] = theta[25:40].reshape((35))
    parameters[“b2“] = theta[40:43].reshape((31))
    parameters[“W3“] = theta[43:46].reshape((13))
    parameters[“b3“] = theta[46:47].reshape((11))

    return parameters

def gradients_to_vector(gradients):
    “““
    Roll all our gradients dictionary into a single vector satisfying our specific required shape.
    “““
    
    count = 0
    for key in [“dW1“ “db1“ “dW2“ “db2“ “dW3“ “db3“]:
        # flatten parameter
        new_vector = np.reshape(gradients[key] (-11))
        
        if count == 0:
            theta = new_vector
        else:
            theta = np.concatenate((theta new_vector) axis=0)
        count = count + 1

    return theta

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......      9193  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Practical-aspects-of-Deep-Learning.ipynb

     文件      28519  2018-07-24 11:29  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\.ipynb_checkpoints\Gradient+Checking-checkpoint.ipynb

    .......      1970  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\gc_utils.py

     文件      28397  2018-07-24 11:47  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\Gradient+Checking.ipynb

    .......    177586  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\images\1Dgrad_kiank.png

    .......    124698  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\images\dictionary_to_vector.png

    .......   1755459  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\images\handbackward_kiank.png

    .......   2246535  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\images\handforward_kiank.png

    .......    180602  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\images\NDgrad_kiank.png

    .......       521  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\testCases.py

     文件       2280  2018-07-24 11:27  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\__pycache__\gc_utils.cpython-36.pyc

     文件        708  2018-07-24 11:27  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Gradient Checking\__pycache__\testCases.cpython-36.pyc

     文件     256273  2018-07-24 11:27  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Initialization\.ipynb_checkpoints\Initialization-checkpoint.ipynb

     文件     256273  2018-07-24 11:27  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Initialization\Initialization.ipynb

     文件       7711  2018-07-24 10:39  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Initialization\init_utils.py

     文件       7232  2018-07-24 10:40  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Initialization\__pycache__\init_utils.cpython-36.pyc

     文件     236268  2018-07-24 10:50  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\.ipynb_checkpoints\Regularization-checkpoint.ipynb

    .......      6038  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\datasets\data.mat

    .......    616958  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\datasets\test_catvnoncat.h5

    .......   2572022  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\datasets\train_catvnoncat.h5

    .......   1714401  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\images\dropout1_kiank.mp4

    .......   2461616  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\images\dropout2_kiank.mp4

    .......    123636  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\images\field_kiank.png

     文件     267447  2018-07-24 14:54  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\Regularization.ipynb

     文件      10755  2018-07-24 10:57  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\reg_utils.py

    .......      4370  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\testCases.py

     文件       9800  2018-07-24 10:57  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\__pycache__\reg_utils.cpython-36.pyc

     文件       3976  2018-07-24 10:48  02-Improving-Deep-Neural-Networks\week1\Programming-Assignments\Regularization\__pycache__\testCases.cpython-36.pyc

    .......    146556  2017-08-28 03:55  02-Improving-Deep-Neural-Networks\week1\quiz.pdf

     文件       6993  2018-07-25 18:58  02-Improving-Deep-Neural-Networks\week2\.ipynb_checkpoints\optimization-algoritihms-checkpoint.ipynb

............此处省略63个文件信息

评论

共有 条评论