예제 #1
0
def convnet_cost(W_fb, b_fb, V, c, W, b, x, y1):
    layer1 = tanh_conv_layer(W_fb, b_fb, x)
    layer1_size = np.prod(layer1.shape[1:])
    layer2 = tanh_layer(V, c,
            np.reshape(layer1, (x.shape[0], layer1_size)))
    cost = ova_svm_cost(W, b, layer2, y1)
    return cost
예제 #2
0
def convnet_prediction(W_fb, b_fb, V, c, W, b, x):
    layer1 = tanh_conv_layer(W_fb, b_fb, x)
    layer1_size = np.prod(layer1.shape[1:])
    layer2 = tanh_layer(V, c,
            np.reshape(layer1, (x.shape[0], layer1_size)))
    prediction = ova_svm_prediction(W, b, layer2)
    return prediction
예제 #3
0
def convnet_cost(W_fb, b_fb, V, c, W, b, x, y1):
    layer1 = tanh_conv_layer(W_fb, b_fb, x)
    layer1_size = np.prod(layer1.shape[1:])
    layer2 = tanh_layer(V, c, np.reshape(layer1, (x.shape[0], layer1_size)))
    cost = ova_svm_cost(W, b, layer2, y1)
    return cost
예제 #4
0
def convnet_prediction(W_fb, b_fb, V, c, W, b, x):
    layer1 = tanh_conv_layer(W_fb, b_fb, x)
    layer1_size = np.prod(layer1.shape[1:])
    layer2 = tanh_layer(V, c, np.reshape(layer1, (x.shape[0], layer1_size)))
    prediction = ova_svm_prediction(W, b, layer2)
    return prediction