-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,418 additions
and
1,329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 6 additions & 10 deletions
16
eynollah/eynollah/train/build_model_load_pretrained_weights_and_save.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,29 @@ | ||
import os | ||
import sys | ||
import tensorflow as tf | ||
import keras , warnings | ||
import keras, warnings | ||
from keras.optimizers import * | ||
from sacred import Experiment | ||
from models import * | ||
from utils import * | ||
from metrics import * | ||
|
||
|
||
|
||
|
||
def configuration(): | ||
gpu_options = tf.compat.v1.GPUOptions(allow_growth=True) | ||
session = tf.compat.v1.Session(config=tf.compat.v1.ConfigProto(gpu_options=gpu_options)) | ||
|
||
|
||
if __name__=='__main__': | ||
if __name__ == '__main__': | ||
n_classes = 2 | ||
input_height = 224 | ||
input_width = 448 | ||
weight_decay = 1e-6 | ||
pretraining = False | ||
dir_of_weights = 'model_bin_sbb_ens.h5' | ||
#configuration() | ||
model = resnet50_unet(n_classes, input_height, input_width,weight_decay,pretraining) | ||
|
||
# configuration() | ||
|
||
model = resnet50_unet(n_classes, input_height, input_width, weight_decay, pretraining) | ||
model.load_weights(dir_of_weights) | ||
model.save('./name_in_another_python_version.h5') | ||
|
||
|
Oops, something went wrong.