INNER CODE UNIT · Python

update_parameters_with_sgd_checker

amanchadha/coursera-deep-learning-specialization · C2 - Improving Deep Neural Networks Hyperparameter tuning, Regularization and Optimization/Week 2/testCases.py:22

def update_parameters_with_sgd_checker(function, inputs, outputs):
    if function(inputs) == outputs:
        print("Correct")
    else:
        print("Incorrect")
"""

def random_mini_batches_test_case():
    np.random.seed(1)
    mini_batch_size = 64
    X = np.random.randn(12288, 148)
    Y = np.random.randn(1, 148) < 0.5
    return X, Y, mini_batch_size

def initialize_velocity_test_case():
    np.random.seed(1)
    W1 = np.random.randn(2,3)
    b1 = np.random.randn(2,1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…