18#include "kernels/Utils.h"
34 switch (
input()->element_type())
36 case DataType::FLOAT32:
40 throw std::runtime_error(
"luci-intp Log Unsupported type.");
44void Log::evalFloat()
const
46 const auto input_data = getTensorData<float>(
input());
48 auto output_data = getTensorData<float>(
output());
49 for (int64_t i = 0; i < input_shape.num_elements(); ++i)
51 output_data[i] = std::log(input_data[i]);
void resize(const Shape &new_shape)
const Shape & shape() const
void configure() override
const Tensor * input() const
void execute() const override
Log(const Tensor *input, Tensor *output)