Compilation warnings removed from tensor_format.h
Removed compilation warnings
This commit is contained in:
parent
83c6c627e5
commit
89ea6622a7
@ -120,6 +120,9 @@ inline int GetTensorSpatialDims(int num_dims, TensorFormat format) {
|
|||||||
// Note: the VECT_W is not counted as an independent spatial dim here,
|
// Note: the VECT_W is not counted as an independent spatial dim here,
|
||||||
// since it just a component of the width dimension.
|
// since it just a component of the width dimension.
|
||||||
return num_dims - 3; // Exclude N,C,VectDim.
|
return num_dims - 3; // Exclude N,C,VectDim.
|
||||||
|
default:
|
||||||
|
LOG(FATAL) << "Unknown format " << format;
|
||||||
|
return -1; // Avoid compiler warning about missing return value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,6 +147,9 @@ inline int GetTensorDimsFromSpatialDims(int num_spatial_dims,
|
|||||||
case FORMAT_NCHW_VECT_C:
|
case FORMAT_NCHW_VECT_C:
|
||||||
case FORMAT_NHWC_VECT_W:
|
case FORMAT_NHWC_VECT_W:
|
||||||
return num_spatial_dims + 3; // Include N,C,VectDim.
|
return num_spatial_dims + 3; // Include N,C,VectDim.
|
||||||
|
default:
|
||||||
|
LOG(FATAL) << "Unknown format " << format;
|
||||||
|
return -1; // Avoid compiler warning about missing return value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user