<std::runtime_error/C++Error/error/condition>
Error in `(function (size, options) 
{
    .Call(`_torch_cpp_torch_namespace_randn_size_IntArrayRef`, 
        size, options)
})(size = c(20, 3), options = list(dtype = NULL, layout = NULL, 
    device = NULL, requires_grad = FALSE))`: Lantern is not loaded. Please use `install_torch()` to install additional dependencies.

test_that("create_dataloader builds iterable batches", {
loader <- create_dataloader(x, y, batch_size = 5)
# --- Interpret returned batch flexibly (unnamed or named) ---
bx <- if (!is.null(names(batch1))) batch1[[1]] else batch1[[1]]
by <- if (length(batch1) > 1) batch1[[2]] else NULL

test_that("split_train_test divides torch tensors correctly", {
split <- split_train_test(x, y, train_frac = 0.7)
} else if (is.list(train) && "x" %in% names(train)) {

"split_train_test divides torch tensors correctly"

split_train_test divides torch tensors correctly

<std::runtime_error/C++Error/error/condition>
Error in `cpp_torch_float32()`: Lantern is not loaded. Please use `install_torch()` to install additional dependencies.

test_that("convert_to_tensor normalizes and converts correctly", {
# if the function returns list(x, y) or similar

"convert_to_tensor normalizes and converts correctly"

convert_to_tensor normalizes and converts correctly