Skip to content

Commit

Permalink
fix #86
Browse files Browse the repository at this point in the history
  • Loading branch information
lanpa committed Feb 16, 2018
1 parent 49ce85f commit 89322aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']


# -- Options for HTMLHelp output ------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion tensorboardX/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from .src.attr_value_pb2 import AttrValue
from .src.tensor_shape_pb2 import TensorShapeProto

import torch
from distutils.version import LooseVersion


Expand All @@ -13,6 +12,7 @@ def replace(name, scope):


def parse(graph):
import torch
scope = {}
for n in graph.nodes():
inputs = [i.uniqueName() for i in n.inputs()]
Expand Down Expand Up @@ -47,6 +47,7 @@ def parse(graph):


def graph(model, args, verbose=False):
import torch
with torch.onnx.set_training(model, False):
trace, _ = torch.jit.trace(model, args)
if LooseVersion(torch.__version__) >= LooseVersion("0.4"):
Expand Down

0 comments on commit 89322aa

Please sign in to comment.