Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Lung Segmentation/models.py to keras 2.4.3 #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Lung Segmentation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from keras.utils.vis_utils import plot_model as plot
from keras.optimizers import SGD
from keras.optimizers import *
from keras.layers import *
from keras.layers import *
import numpy as np

def BCDU_net_D3(input_size = (256,256,1)):
N = input_size[0]
Expand Down Expand Up @@ -75,7 +76,7 @@ def BCDU_net_D3(input_size = (256,256,1)):
conv8 = Conv2D(2, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv8)
conv9 = Conv2D(1, 1, activation = 'sigmoid')(conv8)

model = Model(input = inputs, output = conv9)
model = Model(inputs = inputs, outputs = conv9)
model.compile(optimizer = Adam(lr = 1e-4), loss = 'binary_crossentropy', metrics = ['accuracy'])
return model

Expand Down Expand Up @@ -136,7 +137,7 @@ def BCDU_net_D1(input_size = (256,256,1)):
conv8 = Conv2D(2, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv8)
conv9 = Conv2D(1, 1, activation = 'sigmoid')(conv8)

model = Model(input = inputs, output = conv9)
model = Model(inputs = inputs, outputs = conv9)
model.compile(optimizer = Adam(lr = 1e-4), loss = 'binary_crossentropy', metrics = ['accuracy'])
return model