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

#include <Gaussian.h>

Collaboration diagram for souschef::GaussianUint8DataChefFactory:

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 139 of file Gaussian.h.

Member Function Documentation

◆ create()

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

Implements souschef::DataChefFactory.

Definition at line 162 of file Gaussian.cpp.

163{
164 if (args.count() != 2)
165 {
166 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
167 }
168
169 auto const mean = to_number<float>(args.value(0));
170 auto const stddev = to_number<float>(args.value(1));
171
172 return std::unique_ptr<DataChef>{new GaussianUint8DataChef{mean, stddev}};
173}
args
Definition infer.py:21

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