32constexpr uint32_t inputTensorIdx = 0;
43 if (
args.is_last_layer)
51 uint16_t op_index =
args.kernel_index;
53 const circle::Tensor *
input;
54 const circle::Tensor *
output;
56 uint8_t *dloss_dinput_data;
59 uint8_t *dloss_doutput_data;
68 assert(input !=
nullptr);
69 assert(output !=
nullptr);
76 assert(output_data !=
nullptr);
83 dloss_dinput_data = runtime_kernel.
inputs_data[inputTensorIdx];
86 assert(dloss_dinput_data !=
nullptr);
87 assert(dloss_doutput_data !=
nullptr);
101 uint8_t *jacobian_row_data =
nullptr;
104 assert(status ==
Ok);
110 core::utils::castInputData<float>(output_data),
111 core::utils::castOutputData<float>(jacobian_row_data),
112 core::utils::castOutputData<float>(dloss_dinput_data));
114#ifdef OM_MEMORY_ESTIMATE
int32_t dimensionsCount() const
int32_t dims(int i) const
uint8_t * outputs_data[maxOutputSize]
OMStatus getDataFromStorage(uint16_t op_index, core::OMRuntimeStorage &storage, core::OMRuntimeContext &context)
uint8_t * inputs_data[maxInputSize]
OMStatus readKernel(uint16_t op_index, core::OMRuntimeContext &runtime_context)
const circle::Tensor * outputs[maxOutputSize]
const circle::Tensor * inputs[maxInputSize]
const luci_interpreter::RuntimeShape output_shape
constexpr uint32_t outputTensorIdx
OMDataType
"scalar" value type
void SoftmaxInputGrad(const float *dloss_doutput_data, const core::OMRuntimeShape &dloss_doutput_shape, const float *calculated_data, float *jacobian_row_data, float *dloss_dinput_data)
static OMStatus deallocateMemory(uint8_t *data)
static OMStatus allocateMemory(uint32_t size, uint8_t **data)