20#include "kernels/Utils.h"
22#include <tensorflow/lite/kernels/internal/reference/reduce.h>
40 for (
int j = 0;
j <
i;
j++)
147 switch (
input()->element_type())
149 case DataType::FLOAT32:
157 throw std::runtime_error(
"luci-intp ReduceMax Unsupported type.");
161void ReduceMax::evalFloat()
const
174 float init_value = std::numeric_limits<float>::lowest();
175 tflite::reference_ops::ReduceGeneric<float>(
180 [](
const float current,
const float in) ->
float { return (in > current) ? in : current; });
183void ReduceMax::evalBool()
const
196 bool init_value = std::numeric_limits<bool>::lowest();
197 tflite::reference_ops::ReduceGeneric<bool>(
202 [](
const bool current,
const bool in) ->
bool { return (in > current) ? in : current; });
const std::vector< Tensor * > & getOutputTensors() const
const ReducerParams _params
int32_t num_elements() const
void resize(const Shape &new_shape)
const Shape & shape() const
void execute() const override
const Tensor * input() const
ReduceMax(const Tensor *input, const Tensor *axes, Tensor *output, Tensor *temp_index, Tensor *resolved_axes, const ReducerParams ¶ms)
void configure() override
const Tensor * axes() const
#define LUCI_INTERPRETER_CHECK(cond)
const luci_interpreter::RuntimeShape output_shape
tflite::RuntimeShape getTensorShape(const Tensor *tensor)
T must_cast(loco::Node *node)