From b7fd3607f037bb30943e11eeb655c8a187e6980c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=BE=D1=80=D0=BE=D1=81=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= Date: Thu, 14 Oct 2021 19:27:50 +0300 Subject: [PATCH] fixes --- .gitattributes | 3 +++ model_export/dump_graph.py | 3 ++- model_export/run_docker_centos.sh | 1 + models/nn.py | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..58f0190 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto + +*.sh text eol=crlf diff --git a/model_export/dump_graph.py b/model_export/dump_graph.py index 4ff3ba3..02dd65b 100644 --- a/model_export/dump_graph.py +++ b/model_export/dump_graph.py @@ -7,7 +7,8 @@ from tensorflow.core.framework import attr_value_pb2 from tensorflow.python.tools import optimize_for_inference_lib -import tf2xla_pb2 + +from . import tf2xla_pb2 def model_to_graph( diff --git a/model_export/run_docker_centos.sh b/model_export/run_docker_centos.sh index 4df0f0e..83625e4 100755 --- a/model_export/run_docker_centos.sh +++ b/model_export/run_docker_centos.sh @@ -2,5 +2,6 @@ docker run -it \ --rm \ --env HOME=`pwd` \ -v `pwd`:`pwd` \ + --network host \ centos:centos7.8.2003 \ /bin/bash diff --git a/models/nn.py b/models/nn.py index 3f692ef..fb94b90 100644 --- a/models/nn.py +++ b/models/nn.py @@ -1,5 +1,7 @@ import tensorflow as tf +# DO NOT REMOVE. used by code inside eval() +import numpy as np # noqa: F401 custom_objects = {}