guess_the_correlation_dataset: Guess The Correlation dataset

Description Usage Arguments Value Examples

Description

Prepares the Guess The Correlation dataset available on Kaggle here A copy of this dataset is hosted in a public Google Cloud bucket so you don't need to authenticate.

Usage

1
2
3
4
5
6
7
8
guess_the_correlation_dataset(
  root,
  split = "train",
  transform = NULL,
  target_transform = NULL,
  indexes = NULL,
  download = FALSE
)

Arguments

root

path to the data location

split

string. 'train' or 'submission'

transform

function that takes a torch tensor representing an image and return another tensor, transformed.

target_transform

function that takes a scalar torch tensor and returns another tensor, transformed.

indexes

set of integers for subsampling (e.g. 1:140000)

download

whether to download or not

Value

A torch dataset that can be consumed with torch::dataloader().

Examples

1
2
3
4
if (torch::torch_is_installed() && FALSE) {
gtc <- guess_the_correlation_dataset("./data", download = TRUE)
length(gtc)
}

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