Question: NameError Traceback ( most recent call last ) Cell In [ 2 ] , line 2 6 2 3 model.add ( layers . Flatten (

NameError Traceback (most recent call last)
Cell In[2], line 26
23 model.add(layers.Flatten(input_shape=(28,28)))
25 # Tune the number of hidden layers
--->26 for i in range(hp.Int('num_layers', 1,4)):
27 # Tune the size of the hidden layers
28 model.add(layers.Dense(units=hp.Int('units_'+ str(i),32,256,32),
29 activation='relu'))
31 # Set dropout for all hidden layers except the last one
NameError: name 'hp' is not defined
how to remove this error?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!