/usr/local/lib64/python3.6/site-packages/caffe2/python/onnx/__pycache__
Edit: /usr/local/lib64/python3.6/site-packages/caffe2/python/onnx/__pycache__/backend.cpython-36.pyc (28901B)
3
EgР @ sf d Z ddlZddlZddlZddlZddlZddlmZm Z m
Z
mZ ddlm
Z
ddlmZ ddlZddlZddlZddlmZ ddlZddlZddlZddlZddlmZmZmZmZ ddlmZ dd l m!Z! ddl"j#j$Z%ddl&Z&d
d Z'dd
Z(G dd de)Z*dd Z+G dd de,Z-ej.ddddgZ/G dd deZ0e0j1Z1e0j2Z2e0j3Z3e0j4Z4e0j5Z5e0j6Z6dS )zaBackend for running ONNX on Caffe2
To run this, you will need to have Caffe2 installed as well.
N)core workspacernn_cellgru_cell)ModelHelper)
caffe2_pb2)TensorProto)BackendDevice
DeviceTypenamedtupledict) Workspace) Caffe2Repc C s$ y
| j dS tk
r | S X d S )Nzutf-8)decodeAttributeError)s r F/usr/local/lib64/python3.6/site-packages/caffe2/python/onnx/backend.py
force_unicode' s
r c C s( t jtjt jtji}tj|| j | j S )N)
r CPUr ZCUDAr Z
GpuDeviceTyper ZDeviceOptiontypeZ device_id)devicemr r r get_device_option- s r c @ s, e Zd ZdZedd Zdd fddZdS ) OnnxAttributeszx
This is a more convenient way to work with ONNX/Caffe2 attributes
that is not the protobuf representation.
c C s&