From 93b5cba94ca05020934c5d1e3401682e33979648 Mon Sep 17 00:00:00 2001 From: MELSunny Date: Mon, 9 Nov 2020 17:19:24 +0000 Subject: [PATCH] Update Lung Segmentation/models.py to keras 2.4.3 Update Lung Segmentation/models.py to keras 2.4.3 --- Lung Segmentation/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Lung Segmentation/models.py b/Lung Segmentation/models.py index 972c39e..006d049 100644 --- a/Lung Segmentation/models.py +++ b/Lung Segmentation/models.py @@ -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] @@ -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 @@ -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