Skip to content

Commit

Permalink
restyled
Browse files Browse the repository at this point in the history
  • Loading branch information
MarsTechHAN committed Jan 22, 2021
1 parent 68dd7d6 commit 9841e26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions keras2ncnn/keras_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ def parse_keras_graph(
ncnn_graph_helper.set_node_attr(
graph_head + '_input', {
'type': 'Input', 'param': ncnn_graph_attr, 'binary': []})
ncnn_graph_helper.add_node_inbounds(graph_head, graph_head + '_input')

ncnn_graph_helper.refresh()
ncnn_graph_helper.add_node_inbounds(
graph_head, graph_head + '_input')

ncnn_graph_helper.refresh()
7 changes: 4 additions & 3 deletions keras2ncnn/keras_debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import shutil
import sys


class KerasDebugger:
ncnn_prog_template = \
'''
Expand Down Expand Up @@ -99,8 +100,8 @@ def init_env(self):
'cmake'
]

subprocess.run(
['python3', '-m', 'pip', 'install', '--upgrade', 'virtualenv>=15.0.0'])
subprocess.run(['python3', '-m', 'pip', 'install',
'--upgrade', 'virtualenv>=15.0.0'])

for util in required_utils:
res = sp.find_executable(util)
Expand All @@ -111,7 +112,7 @@ def init_env(self):
return -1

# Setup virtualenv
import virtualenv # pylint: disable=import-outside-toplevel
import virtualenv # pylint: disable=import-outside-toplevel
virtualenv.create_environment(self.tmp_dir)

activator_filename = os.path.join(
Expand Down

0 comments on commit 9841e26

Please sign in to comment.