Question: Review the methods below that make a NN model. Describe which use pre-trained models. Is just the network structure used or are pretrained weights loaded

Review the methods below that make a NN model. Describe which use pre-trained models. Is just the network structure used or are pretrained weights loaded also? Finally, what does the following line determine:

# Using pretrained weights from Imagenet

pretrained_model = tf.keras.applications.VGG16(weights='imagenet', include_top=False ,input_shape=INPUT_SHAPE)

# Set the model so that all the weights are trainable with the new whale images

pretrained_model.trainable = True # False = transfer learning, True = fine-tuning

# Here the sample from page 461 of the textbook

model = Sequential([

pretrained_model, # Include layers in pretrained model from above

GlobalAveragePooling2D(),

#Dense(200, activation="relu"), # Can add optional additional layers here

Dense(OUTPUT_SHAPE, activation='softmax')

])

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 Accounting Questions!