Threshold module
Thresholds each element of the input Tensor.
nn_threshold(threshold, value, inplace = FALSE)
threshold
: The value to threshold atvalue
: The value to replace withinplace
: can optionally do the operation in-place. Default: FALSE
Threshold is defined as:
*
means, any number of additional dimensionsif (torch_is_installed()) { m <- nn_threshold(0.1, 20) input <- torch_randn(2) output <- m(input) }
Useful links