DLPrimitives
model.hpp
1 #pragma once
2 #include <dlprim/tensor.hpp>
3 
4 namespace dlprim {
5  namespace json {
6  class value;
7  }
11  class ModelBase {
12  public:
13  virtual ~ModelBase(){}
15  virtual json::value const &network() // =0 - due to boost python not fully abstractr
16  {
17  throw ValidationError("Implemente Me");
18  }
20  virtual Tensor get_parameter(std::string const &name) // =0 - due to boost python not fully abstractr
21  {
22  return Tensor();
23  }
24  };
25 }
virtual json::value const & network()
Return representation of the network.
Definition: model.hpp:15
virtual Tensor get_parameter(std::string const &name)
Return CPU tensor containing parameter value by give name.
Definition: model.hpp:20
This class is central representation of json objects.
Definition: json.hpp:652
Thrown in case of invalid parameters.
Definition: definitions.hpp:46
Base class used for loading non-native model formats to dlprimitives.
Definition: model.hpp:11
Mane namespace.
Definition: context.hpp:9
Central Data Contrainer - Tensor.
Definition: tensor.hpp:99