dtype=self._params[i_name].dtype)
else:
self._num_input += 1
- tshape = self._shape[i_name] if i_name in self._shape else ()
+ if i_name in self._shape:
+ tshape = self._shape[i_name]
+ else:
+ raise ValueError("Must provide an input shape for `{0}`.".format(i_name))
if isinstance(self._dtype, dict):
dtype = self._dtype[i_name] if i_name in self._dtype else d_type
else:
else:
fill_node = helper.make_node("ConstantFill", ["input_a"], ["out"], value=value, dtype=dtype, **kwargs)
+ if is_shape == True:
+ inputs = []
+ else:
+ inputs = [helper.make_tensor_value_info("input_a",
+ TensorProto.FLOAT, list(input_dim))]
+
graph = helper.make_graph([fill_node],
"fill_test",
- inputs = [helper.make_tensor_value_info("input_a",
- TensorProto.FLOAT, list(input_dim))],
+ inputs,
outputs = [helper.make_tensor_value_info("out",
TensorProto.FLOAT, list(out.shape))])