tests/testthat/test-Nrm-Mxm.R

test_that("Activation functions only take real numbers", {
  Mxm(0) |> expect_error()
  Nrm(0) |> expect_error()

  Mxm(1) |> expect_no_error()
  Mxm(2) |> expect_no_error()
  Mxm(3) |> expect_no_error()
  Mxm(4) |> expect_no_error()
  Mxm(5) |> expect_no_error()

  Nrm(1) |> expect_no_error()
  Nrm(2) |> expect_no_error()
  Nrm(3) |> expect_no_error()
})

Try the nnR package in your browser

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

nnR documentation built on May 29, 2024, 2:02 a.m.