33 : _input(nullptr), _weights(nullptr), _bias(nullptr), _output(nullptr),
34 _activation(ir::Activation::
NONE), _external_context(nullptr)
43 float output_activation_min = 0, output_activation_max = 0;
58 _external_context->ruy_context());
64 const std::shared_ptr<ExternalContext> &external_context)
69 _activation = activation;
71 _external_context = external_context;
76 if (_input->
data_type() == OperandType::FLOAT32)
82 throw std::runtime_error{
"FullyConnected: unsupported data type"};
A tensor class that is portable for other backends.
ir::DataType data_type() const override final
bool is_constant() const override final
Return true if the tensor is constant.
virtual uint8_t * buffer() const =0
void fullyConnectedFloat32()
void configure(const IPortableTensor *input, const IPortableTensor *weights, const IPortableTensor *bias, ir::Activation activation, IPortableTensor *output, const std::shared_ptr< ExternalContext > &external_context)
void FullyConnected(const FullyConnectedParams ¶ms, const Shape &input_shape, const float *input_data, const Shape &weights_shape, const float *weights_data, const Shape &, const float *optional_bias_data, const Shape &output_shape, float *output_data, ::ruy::Context *ruy_context)
bool IsZeroVector(const float *vector, int v_size)
nnfw::ruy::Shape getTensorShape(const IPortableTensor *tensor)
nnfw::ruy::FusedActivationFunctionType convertActivationType(const ir::Activation activation)
void CalculateActivationRange(ir::Activation activation, T *activation_min, T *activation_max)
float float_activation_min
FusedActivationFunctionType activation
float float_activation_max