Its showing an error on the following line of code #Predictions For First Junction PredJ1 = GRU_model(X_train_Junction1,y_train_Junction1,X_test_Junction1)
Its calling a function from previous cell:
def GRU_model(X_Train, y_Train, X_Test):
early_stopping = callbacks.EarlyStopping(min_delta=0.001,patience=10, restore_best_weights=True)
#The GRU model
model = tf.keras.Sequential()
model.add(GRU(units=150, return_sequences=True, input_shape=(X_Train.shape[1],1), activation='tanh'))
model.add(Dropout(0.2))
model.add(GRU(units=150, return_sequences=True, input_shape=(X_Train.shape[1],1), activation='tanh'))
model.add(Dropout(0.2))
model.add(GRU(units=50, return_sequences=True, input_shape=(X_Train.shape[1],1), activation='tanh'))
model.add(Dropout(0.2))
model.add(GRU(units=50, return_sequences=True, input_shape=(X_Train.shape[1],1), activation='tanh'))
model.add(Dropout(0.2))
model.add(GRU(units=50, input_shape=(X_Train.shape[1],1), activation='tanh'))
model.add(Dropout(0.2))
model.add(Dense(units=1))
# Compiling the model
model.compile(optimizer=SGD(decay=1e-7, momentum=0.9),loss='mean_squared_error')
model.fit(X_Train,y_Train, epochs=50, batch_size=150,callbacks=[early_stopping])
pred_GRU= model.predict(X_Test)
return pred_GRU