|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #ifndef TFCSONNXHANDLER_H
18 #define TFCSONNXHANDLER_H
26 #include <onnxruntime_cxx_api.h>
142 virtual void print(std::ostream &strm)
const override;
236 #if ORT_API_VERSION > 11
243 std::vector<Ort::AllocatedStringPtr> m_storeInputNodeNames;
260 #if ORT_API_VERSION > 11
267 std::vector<Ort::AllocatedStringPtr> m_storeOutputNodeNames;
300 template <
typename Tin,
typename Tout>
313 OrtArenaAllocator, OrtMemTypeDefault);
324 #endif // TFCSONNXHANDLER_H
std::map< std::string, double > NetworkOutputs
Format for network outputs.
VNetworkBase()
VNetworkBase default constructor.
void writeBytesToTTree(TTree &tree, const std::vector< char > &bytes)
Write the content of the proto file to a TTree as a branch.
std::vector< const char * > m_inputNodeNames
names that index the input nodes
NetworkOutputs computeTemplate(NetworkInputs const &input)
Do not persistify.
std::vector< std::string > getOutputLayers() const override
List the names of the outputs.
std::vector< const char * > m_outputNodeNames
Do not persistify.
std::function< NetworkOutputs(NetworkInputs)> m_computeLambda
computeTemplate with apropreate types selected.
virtual void print(std::ostream &strm) const override
Write a short description of this net to the string stream.
std::map< std::string, std::map< std::string, double > > NetworkInputs
Format for network inputs.
static const std::string m_defaultTreeName
Default name for the TTree to save in.
NetworkOutputs compute(NetworkInputs const &inputs) const override
Function to pass values to the network.
void writeNetToTTree(TTree &tree) override
Save the network to a TTree.
std::vector< std::string > m_outputLayers
Do not persistify.
void setupPersistedVariables() override
Perform actions that prep data to create the net.
void deleteAllButNet() override
Get rid of any memory objects that arn't needed to run the net.
std::vector< char > getSerializedSession(const std::string &tree_name=m_defaultTreeName)
Return content of the proto (.onnx) file in memory.
TFCSONNXHandler(const std::string &inputFile)
TFCSONNXHandler constructor.
std::vector< std::vector< int64_t > > m_inputNodeDims
Do not persistify.
void setupNet() override
Perform actions that prepare network for use.
void readSerializedSession()
Do not persistify.
std::vector< int64_t > m_outputNodeSize
Do not persistify.
std::vector< std::vector< int64_t > > m_outputNodeDims
Do not persistify.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
ClassDefOverride(TFCSONNXHandler, 1)
Do not persistify.
Ort::MemoryInfo m_memoryInfo
Do not persistify.
std::vector< char > m_bytes
Content of the proto file.
virtual void writeNetToTTree(TTree &tree)=0
Save the network to a TTree.
std::vector< char > readBytesFromTTree(TTree &tree)
Retrieve the content of the proto file from a TTree.
std::unique_ptr< Ort::Session > m_session
The network session itself.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.