I am on exercise 2. After setting training to false, how do we “Add the new binary classification layers” ?
set training to False to avoid keeping track of statistics in the batch norm layer
x = base_model(image_batch, training=False)
Add the new Binary classification layers
x.add(tfl.Dense(units=1, activation=‘sigmoid’))
use global avg pooling to summarize the info in each channel
y = GlobalAveragePooling2D()(x)
Error message:
—> 35 x.add(tfl.Dense(units=1, activation=‘sigmoid’))
36
37 # use global avg pooling to summarize the info in each channel
AttributeError: ‘tensorflow.python.framework.ops.EagerTensor’ object has no attribute ‘add’
If x is initialized to the base_model, how come it lacks a member function add new binary classification layers? Any tips? I am also unsure on how to proceed with integrating the global avg pooling into the model.