Closed martinuray closed 5 years ago
Hi Martin,
thanks for the clear report.
Please try fdeep::model::predict
instead of fdeep::model::predict_single_output
, i.e.:
int main()
{
cimg_library::CImg<unsigned char> image;
image.load_raw("image.raw");
image.resize(256, 256, 1);
const auto model = fdeep::load_model("foo.json");
const auto input = cimg_to_tensor5(image, 0.0f, 1.0f);
const auto result = model.predict({input});
std::cout << fdeep::show_tensor5s(result) << std::endl;
}
Hi, thanks. That solved my issue!
I have a python application, where I use a derivate of U-Net (Image in - Image out). When I try to predict this with frugally-deep I always run into the problem, that during prediction the execution terminates with:
My c++ code, importing the model is a derivate of the CImg example:
By looking into the code, I observed that there is an assertion, where the output's volume of a prediction must be equal to one. Doesn't that infer with a lot of regression tasks?