tests/testthat/test-reader.R

test_that("can read img", {
  img <- vision_read_jpeg(test_path("imgs/image_00001.jpg"))
  expect_tensor(img)
  expect_equal(img$dtype$.type(), "Float")
})

Try the torchvisionlib package in your browser

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

torchvisionlib documentation built on April 15, 2025, 1:23 a.m.