tensorflow/core/kernels/spectrogram_convert_test_data.cc
// This takes a CSV file representing an array of complex numbers, and saves out
// a version using a binary format to save space in the repository.
This takes a CSV file representing an array of complex numbers, and saves out
a version using a binary format to save space in the repository.
This takes a CSV file representing an array of complex numbers and saves out a version using a binary format to save space in the repository .
Status ConvertCsvToRaw(const string& input_filename) {
  std::vector<std::vector<std::complex<double>>> input_data;
  ReadCSVFileToComplexVectorOrDie(input_filename, &input_data);
  const string output_filename = input_filename + ".bin";
  if (!WriteComplexVectorToRawFloatFile(output_filename, input_data)) {
    return errors::InvalidArgument("Failed to write raw float file ",
                                   input_filename);
  }
  LOG(INFO) << "Wrote raw file to " << output_filename;
  return Status::OK();
}
Status ConvertCsvToRaw ( const string & input_filename ) { std :: vector < std :: vector < std :: complex < double > > > input_data ; ReadCSVFileToComplexVectorOrDie ( input_filename , & input_data ) ; const string output_filename = input_filename + " " ; if ( ! WriteComplexVectorToRawFloatFile ( output_filename , input_data ) ) { return errors :: InvalidArgument ( " " , input_filename ) ; } LOG ( INFO ) << " " << output_filename ; return Status :: OK ( ) ; }
This takes a CSV file representing an array of complex numbers, and saves out
a version using a binary format to save space in the repository.
This takes a CSV file representing an array of complex numbers and saves out a version using a binary format to save space in the repository .