#include "caffe2/core/logging.h"
#include "caffe2/proto/caffe2_pb.h"
#include "caffe2/utils/filler.h"
+#include "caffe2/utils/proto_utils.h"
namespace caffe2 {
inline vector<TensorShape> InferTensor(
const OperatorDef& def,
const vector<TensorShape>& input_type_shape) const {
+ CAFFE_ENFORCE(
+ Verify(def),
+ "(InferTensor) Operator def did not pass schema checking: ",
+ ProtoDebugString(def));
return tensor_inference_function_(def, input_type_shape);
}
net = core.Net("concat")
net.Concat(["A", "B"], ["C", "splits"], axis=1)
- net.Concat(["C", "D"], ["E"], order="NCHW")
- net.Concat(["E", "F"], ["G"], add_axis=1, order="NHWC")
+ net.Concat(["C", "D"], ["E", "splitsE"], order="NCHW")
+ net.Concat(["E", "F"], ["G", "splitsG"], add_axis=1, order="NHWC")
(shapes, types) = workspace.InferShapesAndTypes(
[net],
{
net = core.Net("concat")
net.Concat(["A", "B"], ["C", "splits"], axis=1)
- net.Concat(["C", "D"], ["E"], order="NCHW")
- net.Concat(["E", "F"], ["G"], add_axis=1, order="NHWC")
+ net.Concat(["C", "D"], ["E", "splitsE"], order="NCHW")
+ net.Concat(["E", "F"], ["G", "splitsG"], add_axis=1, order="NHWC")
(shapes, types) = workspace.InferShapesAndTypes(
[net],
blob_dimensions={