Skip to content

Commit

Permalink
creat path for the model
Browse files Browse the repository at this point in the history
  • Loading branch information
Atashnezhad committed Jul 4, 2023
1 parent b6d1fa0 commit b6147a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions neural_network_model/transfer_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,9 @@ def train_model(self, epochs=10, batch_size=32, **kwargs):
model_save_location: location to save the model default is self.model_save_location
"""
if kwargs.get("model_save_location"):
# check if the path exists if not create it
if not os.path.exists(kwargs.get("model_save_location")):
os.makedirs(kwargs.get("model_save_location"))
self.model_save_path = kwargs.get("model_save_path")
model_name = kwargs.get("model_name", "tf_model.h5")

Expand Down

0 comments on commit b6147a5

Please sign in to comment.