dogs_vs_cats_dataset: Dog vs cats dataset

Description Usage Arguments Value Examples

Description

Prepares the dog vs cats dataset available in Kaggle here

Usage

1
dogs_vs_cats_dataset(root, token = NULL, download = TRUE, ...)

Arguments

root

path to the data location

token

a path to the json file obtained in Kaggle. See here for additional info.

download

wether to download or not

...

other arguments passed to torchvision::image_folder_dataset().

Value

A torch::dataset() ready to be used with dataloaders.

Examples

1
2
3
4
5
if (torch::torch_is_installed() && FALSE) {
dogs_cats <- dogs_vs_cats_dataset("./data", token = "path/to/kaggle.json",
                                  download = TRUE)
length(dogs_cats)
}

torchdatasets documentation built on Oct. 7, 2021, 5:09 p.m.