How to convert goslice to libtorch.cTensor fast?
my performance block by the ts.NewTensorFrom, it costs too much time
@ZonghaoWang
Can you give more detail - code example and how you measure your performance please?

DeepX is an float32 slice, whose length is 2000000. I convert it to ctensor and reshape to 1000 X 2000. The time costs is 130ms
Your time measurement was taken for other steps after ts.TensorFrom. Can you just break down just calculate time for ‘ts.TensorFrom’ only? And how do you judge it is slow? In comparison to which? Thanks.
hi,

Any how slow to compare to Python Pytorch? Or other framework?
Year, I just like go, and use it to train and serving model.
When I train small model, the input data convert between go and c may cost too much time. And I test some method to acc it.
like this:
