#include <umbridge.h>
Definition at line 73 of file umbridge.h.
Public Member Functions | |
HTTPModel (std::string host, std::string name, httplib::Headers headers=httplib::Headers()) | |
std::vector< std::size_t > | GetInputSizes (const json &config_json=json()) const override |
std::vector< std::size_t > | GetOutputSizes (const json &config_json=json()) const override |
std::vector< std::vector< double > > | Evaluate (const std::vector< std::vector< double >> &inputs, json config_json=json()) override |
std::vector< double > | Gradient (unsigned int outWrt, unsigned int inWrt, const std::vector< std::vector< double >> &inputs, const std::vector< double > &sens, json config_json=json()) override |
std::vector< double > | ApplyJacobian (unsigned int outWrt, unsigned int inWrt, const std::vector< std::vector< double >> &inputs, const std::vector< double > &vec, json config_json=json()) override |
std::vector< double > | ApplyHessian (unsigned int outWrt, unsigned int inWrt1, unsigned int inWrt2, const std::vector< std::vector< double >> &inputs, const std::vector< double > &sens, const std::vector< double > &vec, json config_json=json()) override |
bool | SupportsEvaluate () override |
bool | SupportsGradient () override |
bool | SupportsApplyJacobian () override |
bool | SupportsApplyHessian () override |
Public Member Functions inherited from umbridge::Model | |
Model (std::string name) | |
std::string | GetName () const |
|
inline |
Definition at line 76 of file umbridge.h.
References nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at(), cli, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::dump(), headers, umbridge::Model::name, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse(), supportsApplyHessian, supportsApplyJacobian, supportsEvaluate, supportsGradient, nlohmann::to_string(), and nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value().
|
inlineoverridevirtual |
Reimplemented from umbridge::Model.
Definition at line 229 of file umbridge.h.
References cli, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::dump(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get(), headers, umbridge::Model::name, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse(), throw_if_error_in_response(), and nlohmann::to_string().
Referenced by muq::Modeling::UMBridgeModPiece::ApplyHessianImpl().
|
inlineoverridevirtual |
Reimplemented from umbridge::Model.
Definition at line 202 of file umbridge.h.
References cli, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::dump(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get(), headers, umbridge::Model::name, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse(), throw_if_error_in_response(), and nlohmann::to_string().
Referenced by muq::Modeling::UMBridgeModPiece::ApplyJacobianImpl().
|
inlineoverridevirtual |
Reimplemented from umbridge::Model.
Definition at line 149 of file umbridge.h.
References cli, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::dump(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get(), headers, umbridge::Model::name, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::size(), throw_if_error_in_response(), and nlohmann::to_string().
Referenced by muq::Modeling::UMBridgeModPiece::EvaluateImpl().
|
inlineoverridevirtual |
Implements umbridge::Model.
Definition at line 115 of file umbridge.h.
References cli, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::dump(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get(), headers, umbridge::Model::name, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse(), and nlohmann::to_string().
Referenced by muq::Modeling::UMBridgeModPiece::read_input_size().
|
inlineoverridevirtual |
Implements umbridge::Model.
Definition at line 132 of file umbridge.h.
References cli, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::dump(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get(), headers, umbridge::Model::name, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse(), and nlohmann::to_string().
Referenced by muq::Modeling::UMBridgeModPiece::read_output_size().
|
inlineoverridevirtual |
Reimplemented from umbridge::Model.
Definition at line 174 of file umbridge.h.
References cli, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::dump(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get(), headers, umbridge::Model::name, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse(), throw_if_error_in_response(), and nlohmann::to_string().
Referenced by muq::Modeling::UMBridgeModPiece::GradientImpl().
|
inlineoverridevirtual |
Reimplemented from umbridge::Model.
Definition at line 269 of file umbridge.h.
References supportsApplyHessian.
Referenced by muq::Modeling::UMBridgeModPiece::ApplyHessianImpl().
|
inlineoverridevirtual |
Reimplemented from umbridge::Model.
Definition at line 266 of file umbridge.h.
References supportsApplyJacobian.
Referenced by muq::Modeling::UMBridgeModPiece::ApplyJacobianImpl().
|
inlineoverridevirtual |
Reimplemented from umbridge::Model.
Definition at line 260 of file umbridge.h.
References supportsEvaluate.
Referenced by muq::Modeling::UMBridgeModPiece::EvaluateImpl().
|
inlineoverridevirtual |
Reimplemented from umbridge::Model.
Definition at line 263 of file umbridge.h.
References supportsGradient.
Referenced by muq::Modeling::UMBridgeModPiece::GradientImpl().
|
inlineprivate |
Definition at line 284 of file umbridge.h.
References nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::end(), and nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::find().
Referenced by ApplyHessian(), ApplyJacobian(), Evaluate(), and Gradient().
|
mutableprivate |
Definition at line 275 of file umbridge.h.
Referenced by ApplyHessian(), ApplyJacobian(), Evaluate(), GetInputSizes(), GetOutputSizes(), Gradient(), and HTTPModel().
|
private |
Definition at line 276 of file umbridge.h.
Referenced by ApplyHessian(), ApplyJacobian(), Evaluate(), GetInputSizes(), GetOutputSizes(), Gradient(), and HTTPModel().
|
private |
Definition at line 281 of file umbridge.h.
Referenced by HTTPModel(), and SupportsApplyHessian().
|
private |
Definition at line 280 of file umbridge.h.
Referenced by HTTPModel(), and SupportsApplyJacobian().
|
private |
Definition at line 278 of file umbridge.h.
Referenced by HTTPModel(), and SupportsEvaluate().
|
private |
Definition at line 279 of file umbridge.h.
Referenced by HTTPModel(), and SupportsGradient().