mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Work around protobuf issues by importing onnx first (#6833)
This commit is contained in:
parent
aa56a1211d
commit
750a323ca1
|
|
@ -15,6 +15,13 @@ import collections
|
|||
from subprocess import Popen, PIPE
|
||||
import zipfile
|
||||
|
||||
# When onnx is built against a version of protobuf that is older than
|
||||
# that which is vendored with caffe2, onnx will crash if caffe2's
|
||||
# vendored protobuf is loaded first. We can work around this by
|
||||
# importing onnx first, which will cause it to go out and pick up the
|
||||
# system protobuf.
|
||||
import onnx.backend
|
||||
|
||||
import caffe2
|
||||
from caffe2.python import core, workspace, rnn_cell, gru_cell
|
||||
from caffe2.python.model_helper import ModelHelper
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user