When download jupyter to run on my laptop
def model(X_train, Y_train, X_test, Y_test, learning_rate = 0.0001,
num_epochs = 1500, minibatch_size = 32, print_cost = True):
…
It give error
"---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[33], line 1
----> 1 parameters, costs, train_acc, test_acc = model(new_train, new_y_train, new_test, new_y_test, num_epochs=100)
Cell In[32], line 58, in model(X_train, Y_train, X_test, Y_test, learning_rate, num_epochs, minibatch_size, print_cost)
55 epoch_total_loss = 0.
57 #We need to reset object to start measuring from 0 the accuracy each epoch
—> 58 train_accuracy.reset_states()
60 for (minibatch_X, minibatch_Y) in minibatches:
62 with tf.GradientTape() as tape:
63 # 1. predict
AttributeError: ‘CategoricalAccuracy’ object has no attribute ‘reset_states’
"
the ver of tensorflow is 2.16.1
So what is the issue here?