Enhancements to process images through PIL and also add RESNET50B
This commit is contained in:
@@ -38,7 +38,7 @@ from matplotlib import pyplot
|
||||
import numpy as np
|
||||
import tensorflow
|
||||
|
||||
def resnet50(input_shape,classes):
|
||||
def resnet50(input_shape,classes,model_name='resnet50'):
|
||||
x_input=keras.Input(input_shape)
|
||||
|
||||
x=Conv2D(64,(7,7),strides=(2,2),name='conv1')(x_input)
|
||||
@@ -74,7 +74,7 @@ def resnet50(input_shape,classes):
|
||||
x=Dense(classes,activation='sigmoid',name='fc'+str(classes))(x)
|
||||
else:
|
||||
x=Dense(classes,activation='softmax',name='fc'+str(classes))(x)
|
||||
model=keras.Model(inputs=x_input,outputs=x,name='resnet50')
|
||||
model=keras.Model(inputs=x_input,outputs=x,name=model_name)
|
||||
return model
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user