You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.
# Caffe2 predictor requires all input blobs (including the
# real model inputs) are initialized in init_net
for value_info in graph_def.input:
if value_info.name in initialized:
continue
op_def = caffe2_pb2.OperatorDef()
op_def.output.extend([value_info.name])
op_def.type = 'GivenTensorFill'
shape = list(d.dim_value for d in value_info.type.tensor_type.shape.dim)
# TODO: Putting this in the init net will make it run faster, but it
# causes some tests to fail...
# shape = (1,)
shape_arg = op_def.arg.add()
shape_arg.name = 'shape'
shape_arg.ints.extend(shape)
values_arg = op_def.arg.add()
values_arg.name = 'values'
values_arg.floats.extend(np.ones(shape).flatten().tolist())
init_net.op.extend([op_def])
This is pretty pointless (we never actually use the values from the init net) AND it's really expensive (because we materialize a tensor proto for the inputs.) The shape hack used to work by Caffe2 rejects it now.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In
backend.py
:This is pretty pointless (we never actually use the values from the init net) AND it's really expensive (because we materialize a tensor proto for the inputs.) The shape hack used to work by Caffe2 rejects it now.
The text was updated successfully, but these errors were encountered: