torch for R
https://torch.mlverse.org/start/custom_datasettorch_tensor(as.integer(as.numeric(as.factor("one")))) torch_tensor 1 [ CPULongType{1} ] Now, let’s create a dataset for penguins. A dataset for penguins. In initialize(), we convert the data as planned and store them for later delivery. Like the categorical input features, species, the target, is discrete, and thus, converted to torch Long.