interface ov::IVariableState

Overview

Minimal interface for variable state implementation. More…

#include <ivariable_state.hpp>

template IVariableState: public std::enable_shared_from_this< IVariableState >
{
    // construction

    IVariableState(const std::string& name);

    // methods

    virtual const std::string& get_name() const;
    virtual void reset();
    virtual void set_state(const ov::Tensor& state);
    virtual const ov::Tensor& get_state() const;

protected:
};

Detailed Documentation

Minimal interface for variable state implementation.

Methods

virtual const std::string& get_name() const

Gets a variable state name.

Returns:

A string representing variable state name

virtual void reset()

Reset internal variable state for relevant infer request, to a value specified as default for according ReadValue node.

virtual void set_state(const ov::Tensor& state)

Sets the new state for the next inference.

Parameters:

newState

A new state

virtual const ov::Tensor& get_state() const

Returns the value of the variable state.

Returns:

The value of the variable state