INNER CODE UNIT · Python

random_mini_batches_test_case

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

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)
    W2 = np.random.randn(3,3)
    b2 = np.random.randn(3,1)
    parameters = {"W1": W1, "b1": b1, "W2": W2, "b2": b2}
    return parameters

def update_parameters_with_momentum_test_case():
    np.random.seed(1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…