Skip to content

Commit 9878986

Browse files
committed
turn into ExamplesIf
1 parent 2964dc4 commit 9878986

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

R/mask-type.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,13 @@ entmax_15_function <- torch::autograd_function(
297297
#' @return The projection result P of the same shape as input, such that
298298
#' \eqn{\sum_{dim} P = 1 \forall dim} elementwise.
299299
#'
300-
#' @examples
300+
#' @examplesIf torch::torch_is_installed()
301+
#' \dontrun{
301302
#' input <- torch::torch_randn(10,5, requires_grad = TRUE)
302303
#' # create a top3 alpha=1.5 entmax on last input dimension
303304
#' nn_entmax <- entmax15(dim=-1L, k = 3)
304305
#' result <- nn_entmax(input)
306+
#' }
305307
#' @export
306308
entmax15 <- torch::nn_module(
307309
"entmax_15",

cran-comments.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44

55
* This is a new release.
66

7-
Note 1 : Package new submission after fixing the issues that led to archiving on 2025-04-01.
8-
Misspelled words in description are names and have been added to package `inst/WORDLIST`
9-
Note 2 : Example duration is inherent to fitting a model with the underlying torch framework.
7+
Note 1 : Example duration is inherent to fitting a model with the underlying torch framework.

man/entmax15.Rd

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)