tests/testthat/test-reduction.R

context("reduction")

test_that("reduction works", {
  expect_identical(torch_reduction_none(), 0)
  expect_identical(torch_reduction_mean(), 1)
  expect_identical(torch_reduction_sum(), 2)
})

Try the torch package in your browser

Any scripts or data that you put into this service are public.

torch documentation built on May 29, 2024, 9:54 a.m.