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 June 7, 2023, 6:19 p.m.