Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 68792bf

Browse files
aghinsapdxjohnny
authored andcommitted
model: tensorflow: dnnc: Hash hidden_layer to create model_dir
Fixes: #220
1 parent c3100c7 commit 68792bf

File tree

1 file changed

+2
-3
lines changed
  • model/tensorflow/dffml_model_tensorflow

1 file changed

+2
-3
lines changed

model/tensorflow/dffml_model_tensorflow/dnnc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,8 @@ def _model_dir_path(self):
145145
"""
146146
if self.parent.config.directory is None:
147147
return None
148-
model = hashlib.sha384(
149-
"".join(self.features).encode("utf-8")
150-
).hexdigest()
148+
_to_hash = self.features + list(map(str, self.parent.config.hidden))
149+
model = hashlib.sha384("".join(_to_hash).encode("utf-8")).hexdigest()
151150
if not os.path.isdir(self.parent.config.directory):
152151
raise NotADirectoryError(
153152
"%s is not a directory" % (self.parent.config.directory)

0 commit comments

Comments
 (0)