Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Constraint

Abstract base class for constraints.


Description

Abstract base class for constraints.

Abstract base class for constraints.

Details

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

Methods

Public methods


Method check()

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

Usage
Constraint$check(value)
Arguments
value

each event in value will be checked.


Method print()

Define the print method for constraints,

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.


torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.