42 const auto cols =
static_cast<int>(
src.shape()[0]);
43 const auto rows =
static_cast<int>(
src.shape()[1]);
44 const auto depth =
static_cast<int>(
src.shape()[2]);
45 const int upper_dims =
src.shape().total_size() / (
cols *
rows * depth);
47 for(
int r = 0; r < upper_dims; ++r)
49 for(
int i = 0; i < depth; ++i)
51 for(
int k = 0; k <
rows; ++k)
53 for(
int l = 0; l <
cols; ++l)
56 result[pos] = (
src[pos] - mean[i]) / std[i];
70 SimpleTensor<float> dst_tmp = normalize_planar_yuv_layer<float>(src_tmp, mean_tmp, std_tmp);
81 SimpleTensor<float> dst_tmp = normalize_planar_yuv_layer<float>(src_tmp, mean_tmp, std_tmp);