0

How to fill or provide input tensor while inferencing in cpp.

i'm using memcpy like below.

memcpy(interpreter->typed_input_tensor<float>(0), frame.data, frame.step[0] * frame.rows);

frame is numpy array got using opencv imread.

at run time i'm getting Segmentation fault (core dumped) error.

also used vector instead of numpy array like below.

memcpy(interpreter->typed_input_tensor<int>(0), myvec, sizeof(myvec));

myvec is vector. but got the same error.

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190

0 Answers0