Commit 9dc2fcc7 authored by sjjsmuel's avatar sjjsmuel

temporary removed CAM training

parent 1bc98a63
......@@ -14,7 +14,7 @@ class Resnet50(NetworkBase):
self.NUM_CLASSES = number_of_classes
self.WEIGHTS_PATH = weights_path
def get_model(self):
def get_model(self, cam=True):
weights = 'imagenet'
shouldSave = True
......@@ -37,7 +37,10 @@ class Resnet50(NetworkBase):
x = Dense(self.NUM_CLASSES)(x)
out = Dense(self.NUM_CLASSES, activation='softmax', name='prediction')(x)
model = CAMModel(inputs=[input_tensor], outputs=[out, base_model.layers[-1].output])
if cam:
model = CAMModel(inputs=[input_tensor], outputs=[out, base_model.layers[-1].output])
else:
model = Model(inputs=[input_tensor], outputs=[out, base_model.layers[-1].output])
return model
......@@ -111,7 +111,7 @@ test_dataset = test_loader.load_dataset()
# Create Network
network = Resnet50(n_classes, img_width, img_height, channels, base_model_file)
model = network.get_model()
model = network.get_model(cam=False)
#compile the model
model.compile(optimizer=RMSprop())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment