CNTK Convolution1d

Viewed 396

I am trying to create a simple convolution model in CNTK as shown below

def create_model(hidden_dim, output_dim):
    nn=C.layers.Sequential([ C.layers.Embedding(shape=50,name='embedding'),
        C.layers.Convolution1D((40,),num_filters=5, activation=C.ops.relu),
        C.layers.GlobalMaxPooling(),
        C.layers.Dense(shape=40, activation=C.ops.tanh, init_bias=0.1), 
        C.layers.Dense(shape=2, activation=None, init_bias=0.1)
        ])
    return nn

but I keep on getting the following error ValueError: Convolution map tensor must have rank 1 or the same as the input tensor.

1 Answers
Related