ONE - On-device Neural Engine
Loading...
Searching...
No Matches
souschef::GaussianInt16DataChefFactory Struct Reference

#include <Gaussian.h>

Collaboration diagram for souschef::GaussianInt16DataChefFactory:

Public Member Functions

std::unique_ptr< DataChefcreate (const Arguments &args) const
 
- Public Member Functions inherited from souschef::DataChefFactory
virtual ~DataChefFactory ()=default
 

Detailed Description

Definition at line 134 of file Gaussian.h.

Member Function Documentation

◆ create()

std::unique_ptr< DataChef > souschef::GaussianInt16DataChefFactory::create ( const Arguments args) const
virtual

Implements souschef::DataChefFactory.

Definition at line 149 of file Gaussian.cpp.

150{
151 if (args.count() != 2)
152 {
153 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
154 }
155
156 auto const mean = to_number<float>(args.value(0));
157 auto const stddev = to_number<float>(args.value(1));
158
159 return std::unique_ptr<DataChef>{new GaussianInt16DataChef{mean, stddev}};
160}
args
Definition infer.py:21

The documentation for this struct was generated from the following files: