Hello Tobias! I apologize in advance for a possibly stupid question, I'm a novice C++ programmer. Tobias, please tell me how to get each individual floating-point number from the result object into an arbitrary float array (or in other words, how to access each individual element of the result variable) in this code:
....................
const auto model = fdeep::load_model(model_path);
const auto result = model.predict(
{fdeep::tensor(fdeep::tensor_shape(static_cast(5)),
std::vector{0.0, 0.0, 0.0, 0.0, 1284.0})});
std::cout << fdeep::show_tensors(result) << std::endl;
.......................................
Output:
[[[[[[0.2695, 0.7305]]]]]].
How to access the numbers 0.2695, 0.7305 through the result object and store them in an array or separate float variables.
Thank you very much in advance.
Hello Tobias! I apologize in advance for a possibly stupid question, I'm a novice C++ programmer. Tobias, please tell me how to get each individual floating-point number from the result object into an arbitrary float array (or in other words, how to access each individual element of the result variable) in this code:
.................... const auto model = fdeep::load_model(model_path);
const auto result = model.predict( {fdeep::tensor(fdeep::tensor_shape(static_cast(5)),
std::vector{0.0, 0.0, 0.0, 0.0, 1284.0})});
std::cout << fdeep::show_tensors(result) << std::endl;
.......................................
Output:
[[[[[[0.2695, 0.7305]]]]]]. How to access the numbers 0.2695, 0.7305 through the result object and store them in an array or separate float variables. Thank you very much in advance.