shuffle=True,
                                           class_mode='categorical')

validation_generator = test_datagen.flow_from_directory(
    validation_dir,
    target_size=(img_height, img_width),
    batch_size=batch_size,
    shuffle=False,
    class_mode='categorical')

model_ft = tf.keras.models.load_model(args.model)
print(model_ft)

for i in range(2):
    model_ft.layers.pop()
im_in = Input(shape=(img_width, img_height, 3))

if args.network == 'resnetV2':
    base_model = resNetV2(img_width, img_height, include_top=False)
elif args.network == 'squeezenet':
    base_model = squeezeNet(img_width, img_height, .2, include_top=False)
elif args.network == 'vgg16':
    base_model = vgg16(img_width, img_height, include_top=False)
elif args.network == 'mesonet':
    base_model = mesonet(img_width, img_height, include_top=False)
elif args.network == 'denseNet':
    base_model = denseNet(img_width, img_height, include_top=False)

base_model.set_weights(model_ft.get_weights())

pt_output = base_model(im_in)