Skip to contents

Converts an object to a TorchLoss.

Usage

as_torch_loss(x, clone = FALSE, ...)

Arguments

x

(any)
Object to convert to a TorchLoss.

clone

(logical(1))
Whether to make a deep clone.

...

(any)
Additional arguments. Currently used to pass additional constructor arguments to TorchLoss for objects of type nn_loss.

Value

TorchLoss.