class ngraph::VariableValue

Overview

VariableValue stores data and state (reset flag) for a Variable, and provides an interface for changing them. More…

#include <variable_value.hpp>

class VariableValue
{
public:
    // construction

    VariableValue();
    VariableValue(HostTensorPtr value);
    VariableValue(HostTensorPtr value, bool reset);

    // methods

    void set_reset(bool reset);
    bool get_reset() const;
    const HostTensorPtr& get_value() const;
    void set_value(const HostTensorPtr& value);
};

Detailed Documentation

VariableValue stores data and state (reset flag) for a Variable, and provides an interface for changing them.

Construction

VariableValue()

Constructs an uninitialized VariableValue.

VariableValue(HostTensorPtr value)

Constructor for VariableValue.

Parameters:

value

The data for Variable.

VariableValue(HostTensorPtr value, bool reset)

Constructor for VariableValue.

Parameters:

value

Data for Variable.

reset

The current state of the reset flag.

Methods

void set_reset(bool reset)

Sets the reset flag to a new state.

Parameters:

reset

The new state of the reset flag.

bool get_reset() const

Returns the current reset flag state.

const HostTensorPtr& get_value() const

Returns the current stored data.

void set_value(const HostTensorPtr& value)

Sets new values for Variable.

Parameters:

value

New data for Variable.