blace.ai
|
#include <public_ops.h>
Public Member Functions | |
PrepareForHostCopyOP (OpP input, ml_core::DataTypeEnum data_type, ml_core::ColorFormatEnum color_format, ml_core::OrderEnum tensor_order, ml_core::ValueRangeEnum value_range, ml_core::DeviceEnum device) | |
Operator to prepare tensor for copying to host.
blace::ops::PrepareForHostCopyOP::PrepareForHostCopyOP | ( | OpP | input, |
ml_core::DataTypeEnum | data_type, | ||
ml_core::ColorFormatEnum | color_format, | ||
ml_core::OrderEnum | tensor_order, | ||
ml_core::ValueRangeEnum | value_range, | ||
ml_core::DeviceEnum | device | ||
) |
Prepares a the internal tensor for copying to host by making sure all meta data (type, ordering, sizes etc.) are aligned.
This needs to be used together with GraphEvaluator::evaluateToRawMemory() often. E.g. a cv::Mat will expect BGR color in a HWC tensor.
input | |
data_type | The desired datatype. |
color_format | Target color format. |
tensor_order | Target tensor order. |
value_range | Target value range. |
device | Put on device. |