I am working with a multi classification problem using GRU architecture. It seems to have a configuration error. Please help me to debug the model. Thanks in advance.
Here I have provided the model:
# build the network
model = Sequential()
model=models.Sequential()
model.add(layers.GRU(1024,activation='tanh',input_shape=x_train.shape[1:], return_sequences=True))
model.add(layers.GRU(512,activation='tanh',return_sequences=True))
model.add(layers.Flatten())
model.add(layers.Dense(3,activation='sigmoid'))
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
results = model.fit(x_train, y_train, epochs = 150, batch_size=512,validation_data= (x_test, y_test))
Here is the error that I am getting:
InternalError: Failed to call ThenRnnForward with model config: [rnn_mode, rnn_input_mode, rnn_direction_mode]: 3, 0, 0 , [num_layers, input_size, num_units, dir_count, max_seq_length, batch_size, cell_num_units]: [1, 1, 1024, 1, 16000, 512, 0]
[[{{node CudnnRNN}}]]
[[sequential_1/gru/PartitionedCall]] [Op:__inference_train_function_5490]
Function call stack:
train_function -> train_function -> train_function