1 #include "caffe2/opt/shape_info.h" 3 #include "caffe2/core/operator.h" 7 ShapeInfo getShapeInfoFromBlob(
const Blob* blob) {
9 shape_info.shape = GetTensorShapeOfBlob(blob);
10 shape_info.dim_type = shape_info.shape.unknown_shape()
11 ? ShapeInfo::DimType::UNKNOWN
12 : ShapeInfo::DimType::CONSTANT;
16 bool operator==(
const ShapeInfo& lhs,
const ShapeInfo& rhs) {
17 return lhs.dim_type == rhs.dim_type &&
18 lhs.shape.SerializeAsString() == rhs.shape.SerializeAsString();
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...