コード例 #1
0
def test_DNN2(sizes, dropouts, l2_regs, output_dim):
    n, input_dim = 50, 10
    X_train = np.random.rand(n, input_dim)
    Y_train = np.random.rand(n, output_dim)
    dnn = archs.DNN(input_dim=input_dim,
                    dense_sizes=sizes,
                    dropouts=dropouts,
                    l2_regs=l2_regs,
                    summary=False,
                    output_dim=output_dim)
    dnn.fit(X_train, Y_train, epochs=1, batch_size=10)
コード例 #2
0
def test_DNN1(sizes, acts, k_inits):
    n, input_dim = 50, 10
    X_train = np.random.rand(n, input_dim)
    Y_train = np.random.rand(n, 2)
    dnn = archs.DNN(input_dim=input_dim,
                    dense_sizes=sizes,
                    acts=acts,
                    k_inits=k_inits,
                    summary=False,
                    output_dim=2)
    dnn.fit(X_train, Y_train, epochs=1, batch_size=10)