Current Situation
The AutoEncoder exemple in
|
# Modify the MNIST dataset so the target is identical to the input. |
|
mnist_dataset2 <- torch::dataset( |
|
inherit = mnist_dataset, |
|
.getitem = function(i) { |
|
output <- super$.getitem(i) |
|
output$y <- output$x |
|
output |
|
} |
|
) |
|
|
|
train_ds <- mnist_dataset2( |
|
dir, |
|
download = TRUE, |
|
transform = transform_to_tensor |
|
) |
|
|
|
test_ds <- mnist_dataset2( |
|
dir, |
|
train = FALSE, |
|
transform = transform_to_tensor |
|
) |
|
|
|
train_dl <- dataloader(train_ds, batch_size = 128, shuffle = TRUE) |
|
test_dl <- dataloader(test_ds, batch_size = 128) |
is modifying the
torchvision::mnist_dataset$.getitem() whereas using the
torchvision::mnist_dataset$.getbatch() through
dataloader(batch_size = 128)
This prevent the development of .getbatch() feature in the torchvision::mnist_dataset() function
Expected Situation
The Autoencoder should switch to reconfiguring the .getbatch() or use dataloaders with (batch_size = 1).
Current Situation
The AutoEncoder exemple in
luz/vignettes/examples/mnist-autoencoder.Rmd
Lines 17 to 40 in 85ea0d3
is modifying the
torchvision::mnist_dataset$.getitem()whereas using thetorchvision::mnist_dataset$.getbatch()throughdataloader(batch_size = 128)This prevent the development of .getbatch() feature in the torchvision::mnist_dataset() function
Expected Situation
The Autoencoder should switch to reconfiguring the .getbatch() or use dataloaders with (batch_size = 1).