17#include "kernels/Pow.h"
18#include "kernels/Utils.h"
20#include <tensorflow/lite/kernels/internal/reference/reference_ops.h>
28 : Kernel({input1, input2}, {
output})
40void Pow::execute()
const
42 switch (input1()->element_type())
44 case DataType::FLOAT32:
51 assert(
false &&
"Unsupported type.");
55template <
typename T>
void Pow::eval()
const
57 tflite::ArithmeticParams params{};
59 const bool need_broadcast = tflite::reference_ops::ProcessBroadcastShapes(
64 tflite::reference_ops::BroadcastPow4DSlow(
getTensorShape(input1()), getTensorData<T>(input1()),
70 tflite::reference_ops::Pow(
getTensorShape(input1()), getTensorData<T>(input1()),
Pow(const Tensor *input1, const Tensor *input2, Tensor *output)
#define LUCI_INTERPRETER_CHECK(cond)
Shape calculateShapeForBroadcast(const Shape &input1_shape, const Shape &input2_shape)
tflite::RuntimeShape getTensorShape(const Tensor *tensor)