Internal functions to handle various tensor type and value. More...
Go to the source code of this file.
Classes | |
struct | tensor_data_s |
Structure for tensor data. More... | |
Functions | |
gboolean | gst_tensor_data_set (tensor_data_s *td, tensor_type type, gpointer value) |
Set tensor element data with given type. More... | |
gboolean | gst_tensor_data_get (tensor_data_s *td, gpointer value) |
Get tensor element value. More... | |
gboolean | gst_tensor_data_typecast (tensor_data_s *td, tensor_type type) |
Typecast tensor element data. More... | |
gboolean | gst_tensor_data_raw_typecast (gpointer input, tensor_type in_type, gpointer output, tensor_type out_type) |
Typecast tensor element value. More... | |
gboolean | gst_tensor_data_raw_average (gpointer raw, gsize length, tensor_type type, gdouble **result) |
Calculate average value of the tensor. More... | |
gboolean | gst_tensor_data_raw_average_per_channel (gpointer raw, gsize length, tensor_type type, tensor_dim dim, gdouble **results) |
Calculate average value of the tensor per channel (the first dim). More... | |
gboolean | gst_tensor_data_raw_std (gpointer raw, gsize length, tensor_type type, gdouble *average, gdouble **result) |
Calculate standard deviation of the tensor. More... | |
gboolean | gst_tensor_data_raw_std_per_channel (gpointer raw, gsize length, tensor_type type, tensor_dim dim, gdouble *averages, gdouble **results) |
Calculate standard deviation of the tensor per channel (the first dim). More... | |
Internal functions to handle various tensor type and value.
Copyright (c) 2021 Samsung Electronics Co., Ltd. All Rights Reserved.
Definition in file tensor_data.h.
gboolean gst_tensor_data_get | ( | tensor_data_s * | td, |
gpointer | value | ||
) |
Get tensor element value.
td | struct for tensor data |
value | pointer of tensor element value |
Definition at line 143 of file tensor_data.c.
gboolean gst_tensor_data_raw_average | ( | gpointer | raw, |
gsize | length, | ||
tensor_type | type, | ||
gdouble ** | result | ||
) |
Calculate average value of the tensor.
raw | pointer of raw tensor data |
length | byte size of raw tensor data |
type | tensor type |
result | double pointer for average value of given tensor. Caller should release allocated memory. |
Definition at line 315 of file tensor_data.c.
gboolean gst_tensor_data_raw_average_per_channel | ( | gpointer | raw, |
gsize | length, | ||
tensor_type | type, | ||
tensor_dim | dim, | ||
gdouble ** | results | ||
) |
Calculate average value of the tensor per channel (the first dim).
raw | pointer of raw tensor data |
length | byte size of raw tensor data |
type | tensor type |
tensor_dim | tensor dimension |
results | double array contains average values of each channel. Caller should release allocated array. |
Definition at line 360 of file tensor_data.c.
gboolean gst_tensor_data_raw_std | ( | gpointer | raw, |
gsize | length, | ||
tensor_type | type, | ||
gdouble * | average, | ||
gdouble ** | result | ||
) |
Calculate standard deviation of the tensor.
raw | pointer of raw tensor data |
length | byte size of raw tensor data |
type | tensor type |
average | average value of given tensor |
result | double pointer for standard deviation of given tensor. Caller should release allocated memory. |
Definition at line 409 of file tensor_data.c.
gboolean gst_tensor_data_raw_std_per_channel | ( | gpointer | raw, |
gsize | length, | ||
tensor_type | type, | ||
tensor_dim | dim, | ||
gdouble * | averages, | ||
gdouble ** | results | ||
) |
Calculate standard deviation of the tensor per channel (the first dim).
raw | pointer of raw tensor data |
length | byte size of raw tensor data |
type | tensor type |
tensor_dim | tensor dimension |
averages | average values of given tensor per-channel |
results | double array contains standard deviation of each channel. Caller should release allocated array. |
Definition at line 455 of file tensor_data.c.
gboolean gst_tensor_data_raw_typecast | ( | gpointer | input, |
tensor_type | in_type, | ||
gpointer | output, | ||
tensor_type | out_type | ||
) |
Typecast tensor element value.
input | pointer of input tensor data |
in_type | input tensor type |
output | pointer of output tensor data |
out_type | output tensor type |
Definition at line 290 of file tensor_data.c.
gboolean gst_tensor_data_set | ( | tensor_data_s * | td, |
tensor_type | type, | ||
gpointer | value | ||
) |
Set tensor element data with given type.
td | struct for tensor data |
type | tensor type |
value | pointer of tensor element value |
gboolean gst_tensor_data_typecast | ( | tensor_data_s * | td, |
tensor_type | type | ||
) |
Typecast tensor element data.
td | struct for tensor data |
type | tensor type to be transformed |
Definition at line 203 of file tensor_data.c.