Rivet API documentation
![]() |
Rivet 4.1.3
|
Rivet::RivetONNXrt Class Reference
Simple interface class to take care of basic ONNX networks. More...
#include <RivetONNXrt.hh>
Public Member Functions | |
| RivetONNXrt (const string &filename, const string &runname="RivetONNXrt") | |
| Constructor. | |
| template<typename T = float> | |
| vector< vector< T > > | compute (const vector< vector< T > > &inputs) const |
| template<typename T = float> | |
| vector< T > | compute (const vector< T > &inputs) const |
| Given a single-node input vector, populate and return the single-node output vector. | |
| bool | hasKey (const std::string &key) const |
| Method to check if key exists in network metatdata. | |
| template<typename T, typename std::enable_if_t<!is_iterable_v< T >|is_cstring_v< T > >> | |
| T | retrieve (const std::string &key) const |
| std::string | retrieve (const std::string &key) const |
| Template specialisation of retrieve for std::string. | |
| template<typename T> | |
| vector< T > | retrieve (const std::string &key) const |
| Overload of retrieve for vector<T>. | |
| template<typename T> | |
| vector< T > | retrieve (const std::string &key, const vector< T > &defaultreturn) const |
| Overload of retrieve for vector<T>, with a default return. | |
| std::string | retrieve (const std::string &key, const std::string &defaultreturn) const |
| template<typename T, typename std::enable_if_t<!is_iterable_v< T >|is_cstring_v< T > >> | |
| T | retrieve (const std::string &key, const T &defaultreturn) const |
| Log & | getLog () const |
| Logger. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const RivetONNXrt &rort) |
| Printing function for debugging. | |
Detailed Description
Simple interface class to take care of basic ONNX networks.
See analyses/examples/EXAMPLE_ONNX.cc for how to use this.
- Note
- A node is not a neuron but a single tensor of arbitrary dimension size
Member Function Documentation
◆ compute()
◆ retrieve() [1/2]
template<typename T, typename std::enable_if_t<!is_iterable_v< T >|is_cstring_v< T > >>
|
inline |
Method to retrieve value associated with key from network metadata and return value as type T
References Rivet::lexical_cast().
Referenced by retrieve(), retrieve(), and retrieve().
◆ retrieve() [2/2]
template<typename T, typename std::enable_if_t<!is_iterable_v< T >|is_cstring_v< T > >>
|
inline |
Variation of retrieve method that falls back to defaultreturn if key cannot be found
References retrieve().
The documentation for this class was generated from the following file:
- /builds/hepcedar/rivet/include/Rivet/Tools/RivetONNXrt.hh
Generated on for Rivet by
