Skip to content

Commit c7a48da

Browse files
fulltopicfacebook-github-bot
authored andcommitted
Corresponding data type for BYTE (pytorch#15627)
Summary: TensorProto.DataType in caffe2/proto/caffe2.proto has BYTE = 3 defined, while there is no corresponding TypeMeta defined in caffe2/core/types.cc: DataTypeToTypeMeta. This issue failed the C++ tutorial of MNIST + LMDB. Pull Request resolved: pytorch#15627 Differential Revision: D13709602 Pulled By: ezyang fbshipit-source-id: d4826d0f9b3975e6a8478d4bad1abbbedcaea197
1 parent ec8b1c9 commit c7a48da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

caffe2/core/types.cc

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const TypeMeta& DataTypeToTypeMeta(const TensorProto::DataType& dt) {
3737
static std::map<TensorProto::DataType, TypeMeta> type_meta_map{
3838
{TensorProto_DataType_FLOAT, TypeMeta::Make<float>()},
3939
{TensorProto_DataType_INT32, TypeMeta::Make<int>()},
40+
{TensorProto_DataType_BYTE, TypeMeta::Make<uint8_t>()},
4041
{TensorProto_DataType_STRING, TypeMeta::Make<std::string>()},
4142
{TensorProto_DataType_BOOL, TypeMeta::Make<bool>()},
4243
{TensorProto_DataType_UINT8, TypeMeta::Make<uint8_t>()},

0 commit comments

Comments
 (0)