MCPcopy Create free account
hub / github.com/pytorch/pytorch / _GetInputDims

Function _GetInputDims

caffe2/python/caffe_translator.py:183–192  ·  view source on GitHub ↗
(caffe_net)

Source from the content-addressed store, hash-verified

181
182
183def _GetInputDims(caffe_net):
184 input_dims = []
185 if caffe_net.input_dim:
186 input_dims = caffe_net.input_dim
187 elif caffe_net.input_shape:
188 input_dims = caffe_net.input_shape[0].dim
189 elif caffe_net.layer[0].input_param.shape:
190 # getting input dimension from first layer
191 input_dims = caffe_net.layer[0].input_param.shape[0].dim
192 return input_dims
193
194
195class TranslatorRegistry:

Callers 1

TranslateModelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…