Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
sjjsmuel
caries_classifier
Commits
9dc2fcc7
Commit
9dc2fcc7
authored
Jul 02, 2020
by
sjjsmuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temporary removed CAM training
parent
1bc98a63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
network/Resnet50.py
network/Resnet50.py
+5
-2
train_classifier.py
train_classifier.py
+1
-1
No files found.
network/Resnet50.py
View file @
9dc2fcc7
...
...
@@ -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
train_classifier.py
View file @
9dc2fcc7
...
...
@@ -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
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment