Learn R Programming

torch (version 0.2.1)

Constraint: Abstract base class for constraints.

Description

A constraint object represents a region over which a variable is valid, e.g. within which a variable can be optimized.

Arguments

Methods

Public methods

Method check()

Usage

Constraint$check(value)

Details

Returns a byte tensor of sample_shape + batch_shape indicating whether each event in value satisfies this constraint.

Method print()

Usage

Constraint$print()

Method clone()

The objects of this class are cloneable with this method.

Usage

Constraint$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.