File tree Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -141,24 +141,6 @@ caffe2::TypeMeta get_dtype(
141
141
return c10::scalarTypeToTypeMeta (dtype);
142
142
}
143
143
144
- caffe2::TypeMeta get_dtype_from_str (const std::string dtype) {
145
- const auto tgt_dtype = [&]() {
146
- if (dtype == " uint8" )
147
- return torch::kUInt8 ;
148
- else if (dtype == " int16" )
149
- return torch::kInt16 ;
150
- else if (dtype == " int32" )
151
- return torch::kInt32 ;
152
- else if (dtype == " float32" )
153
- return torch::kFloat32 ;
154
- else if (dtype == " float64" )
155
- return torch::kFloat64 ;
156
- else
157
- throw std::runtime_error (" Unsupported dtype" );
158
- }();
159
- return c10::scalarTypeToTypeMeta (tgt_dtype);
160
- }
161
-
162
144
torch::Tensor convert_to_tensor (
163
145
sox_sample_t * buffer,
164
146
const int32_t num_samples,
Original file line number Diff line number Diff line change @@ -68,8 +68,6 @@ caffe2::TypeMeta get_dtype(
68
68
const sox_encoding_t encoding,
69
69
const unsigned precision);
70
70
71
- caffe2::TypeMeta get_dtype_from_str (const std::string dtype);
72
-
73
71
// /
74
72
// / Convert sox_sample_t buffer to uint8/int16/int32/float32 Tensor
75
73
// / NOTE: This function might modify the values in the input buffer to
You can’t perform that action at this time.
0 commit comments