ncnn Use array as the input instead of image

fnatzsnv  于 4个月前  发布在  其他
关注(0)|答案(5)|浏览(41)

Hi. I am training a neural network that uses a sequence as the input instead of an image. How to conduct preprocess like convert into tensor? Are there any demo inferring fully connected network?

slwdgvem

slwdgvem1#

Are you training a neural network with ncnn?

uttx8gqw

uttx8gqw2#

Are you training a neural network with ncnn?

No. Trained with pytorch and converted to ncnn.

ahy6op9u

ahy6op9u3#

try constructor

// external vec
Mat(int w, void* data, size_t elemsize = 4u, Allocator* allocator = 0);

usage:

float* data_ptr;
Mat in(data_length, data_ptr);
3wabscal

3wabscal4#

How is this done in python API?

yrwegjxp

yrwegjxp5#

Does the input need to be flattened before going in?

相关问题