Skip to content

Commit 8690405

Browse files
committed
Change to net.export() for TF2.16
1 parent 0529828 commit 8690405

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/data/tensorflow_mnist/mnist_v2.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ def main(args):
198198

199199
if args.current_host == args.hosts[0]:
200200
ckpt_manager.save()
201-
net.save("/opt/ml/model/1")
201+
if int(tf_major) > 2 or (int(tf_major) == 2 and int(tf_minor) >= 16):
202+
net.export("/opt/ml/model/1")
203+
else:
204+
net.save("/opt/ml/model/1")
202205

203206

204207
if __name__ == "__main__":

0 commit comments

Comments
 (0)