39 const auto pad_data =
reinterpret_cast<const int32_t *
>(
_pad->
buffer());
41 nnfw::cker::train::Depad<T>(pad_data, pad_rank,
getShape(_back_prop_output),
42 getBuffer<T>(_back_prop_output),
getShape(_back_prop_input),
43 getBuffer<T>(_back_prop_input));
49 _back_prop_input = back_prop_input;
50 _back_prop_output = back_prop_output;
59 case OperandType::FLOAT32:
62 case OperandType::QUANT_UINT8_ASYMM:
65 case OperandType::QUANT_INT8_ASYMM:
69 throw std::runtime_error{
"Pad: unsupported data type"};
A tensor class that is portable for other backends.
ir::DataType data_type() const override final
ir::Shape getShape() const override final
Get ir::Shape of tensor.
virtual uint8_t * buffer() const =0
const IPortableTensor * _pad
void forward(bool training) override
void configureBackward(IPortableTensor *back_prop_input, const IPortableTensor *back_prop_output)
nnfw::cker::Shape getShape(const IPortableTensor *tensor)
Get shape of tensor.