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(
141141 return c10::scalarTypeToTypeMeta (dtype);
142142}
143143
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-
162144torch::Tensor convert_to_tensor (
163145 sox_sample_t * buffer,
164146 const int32_t num_samples,
Original file line number Diff line number Diff line change @@ -68,8 +68,6 @@ caffe2::TypeMeta get_dtype(
6868 const sox_encoding_t encoding,
6969 const unsigned precision);
7070
71- caffe2::TypeMeta get_dtype_from_str (const std::string dtype);
72-
7371// /
7472// / Convert sox_sample_t buffer to uint8/int16/int32/float32 Tensor
7573// / NOTE: This function might modify the values in the input buffer to
You can’t perform that action at this time.
0 commit comments