Click here to Skip to main content
15,891,909 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
like this in python:
from tensorflow.keras.optimizers import Adam

x = layers.Flatten()(pre_trained_model.output)

x = layers.Dense(1024, activation='relu')(x)
x = layers.Dropout(0.2)(x)

x = layers.Dense(1, activation='sigmoid')(x)

model = Model(pre_trained_model.input, x)

model.compile(optimizer = Adam(lr=0.001),
loss = 'binary_crossentropy',
metrics = ['acc'])

i want to do in keras.net.I don't know how to get the output and input layer of the model for example Resnet50

What I have tried:

like this in python:
from tensorflow.keras.optimizers import Adam

x = layers.Flatten()(pre_trained_model.output)

x = layers.Dense(1024, activation='relu')(x)
x = layers.Dropout(0.2)(x)                  

x = layers.Dense(1, activation='sigmoid')(x)           

model = Model(pre_trained_model.input, x) 

model.compile(optimizer = Adam(lr=0.001), 
              loss = 'binary_crossentropy', 
              metrics = ['acc'])

i want to do  in keras.net.I don't know how to get the output and input layer of the model for example Resnet50
Posted
Updated 11-Mar-21 19:44pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900