22#include <tensorflow/lite/kernels/internal/reference/fully_connected.h>
39 if (_input_shape.
rank() < 1 || _weights_shape.
rank() != 2)
42 auto const input_elems = element_count(&_input_shape);
53 if (element_count(&_bias_shape) !=
num_units)
61 _output_shape.
rank(_input_shape.
rank());
63 _output_shape.
dim(
i) = _input_shape.
dim(
i);
68 _output_shape.
rank(2);
69 _output_shape.
dim(0) = batch_size;
78 assert(_input_data !=
nullptr);
79 assert(_weights_data !=
nullptr);
81 assert(_output_data !=
nullptr);
86 tflite::FullyConnectedParams
params;
103 tflite::reference_ops::FullyConnected(
uint32_t value(void) const
Return the value.
const Dimension & dim(uint32_t axis) const
uint32_t rank(void) const
FullyConnectedParams & params(void)
void get_act_minmax(const FusedActFunc act, float &act_min, float &act_max)
tflite::FullyConnectedWeightsFormat tflite_weights_format(const FullyConnectedWeightsFormat type)
tflite::RuntimeShape tflite_shape(const loco::TensorShape &shape)
T must_cast(loco::Node *node)
int32_t output_multiplier
float float_activation_min
float float_activation_max
int32_t quantized_activation_max
int32_t quantized_activation_min
FullyConnectedWeightsFormat weights_format