- i'm writing Python with Jupyter notebook in reference and having this kind of error:
TypeError Traceback (most recent call last)
<ipython-input-11-3a2267df06a1> in <module>
1 # Section II: First run the backpropagation simulation
----> 2 model_s = vanilla_backpropagation()
TypeError: vanilla_backpropagation() missing 2 required positional arguments: 'X_train' and 'y_train'
- it caused when I try to run this:
# Section II: First run the backpropagation simulation
model_s = vanilla_backpropagation()
- here's the code for that vanilla_backpropagation function and split the training testing
def vanilla_backpropagation(X_train, y_train):
best_model = None
best_score = 100.00
for i in range(N):
model_s = build_ann(LOSS)
model_s.fit(X_train,
y_train,
epochs = STEPS,
batch_size = batch_size,
verbose = 0)
train_score = model_s.evaluate(X_train, y_train, batch_size = BATCH_SIZE, verbose = 0)
if train_score > best_score:
best_model = model_s
best_score = train_score
return best_model
if __name__ == "__main__":
# Section I: Build the data set
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.2, shuffle = None)
can anyone help with this error? am stuck with it for over days now. thankyou