You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
Hello, all,
I'm writing one operator in c++ side, but encountered some difficulties .
Suppose that we have 2 Tensors: src and dst , both with the format Tensor<xpu, 4, real_t>, the shape of src is (1, 128, 300, 300), and the shape of dst is (1, 128, 400, 400), now i want to copy the data of src to the subspace of dst, with its range (1,128,50:350,50:350); how to do that?
The simplest way is using 'for' loop, and for each element in the corresponding dst, we use "=" assigning its value form src; but when xpu is gpu, this is not allowable; i want to use the crop op in mshdow, but it seems that when cropping a tensor, it returns CroppingExp, and we can only use this in right side of "="; (Another way maybe the Copy fun in mshadow can do it, but i try it not successfuly.);
thanks~
The text was updated successfully, but these errors were encountered:
Hello, all,
I'm writing one operator in c++ side, but encountered some difficulties .
Suppose that we have 2 Tensors: src and dst , both with the format Tensor<xpu, 4, real_t>, the shape of src is (1, 128, 300, 300), and the shape of dst is (1, 128, 400, 400), now i want to copy the data of src to the subspace of dst, with its range (1,128,50:350,50:350); how to do that?
The simplest way is using 'for' loop, and for each element in the corresponding dst, we use "=" assigning its value form src; but when xpu is gpu, this is not allowable; i want to use the crop op in mshdow, but it seems that when cropping a tensor, it returns CroppingExp, and we can only use this in right side of "="; (Another way maybe the Copy fun in mshadow can do it, but i try it not successfuly.);
thanks~
The text was updated successfully, but these errors were encountered: