import keras
from keras import models
from keras import layers


def pretrained_end2end(conv_base, fc_units_list):
    model = models.Sequential()
    model.add(conv_base)
    conv_base.trainable = False
    model.add(layers.Flatten())
    for i, fc_units in enumerate(fc_units_list[:-1]):
        model.add(layers.Dense(fc_units, activation='relu'))
    model.add(layers.Dense(fc_units_list[-1], activation='softmax'))
    model.summary()

1de821be605434281ef69200089356a8e4b21533
<mask token>

<mask token>


def pretrained_end2end(conv_base, fc_units_list):
    model = models.Sequential()
    model.add(conv_base)
    conv_base.trainable = False
    model.add(layers.Flatten())
    for i, fc_units in enumerate(fc_units_list[:-1]):
        model.add(layers.Dense(fc_units, activation='relu'))
    model.add(layers.Dense(fc_units_list[-1], activation='softmax'))
    model.summary()

import keras
from keras import models
from keras import layers


def pretrained_end2end(conv_base, fc_units_list):
    model = models.Sequential()
    model.add(conv_base)
    conv_base.trainable = False
    model.add(layers.Flatten())
    for i, fc_units in enumerate(fc_units_list[:-1]):
        model.add(layers.Dense(fc_units, activation='relu'))
    model.add(layers.Dense(fc_units_list[-1], activation='softmax'))
    model.summary()
