if (FALSE) {
# Load data for LFW People Dataset
lfw <- lfw_people_dataset(download = TRUE)
first_item <- lfw[1]
first_item$x # RGB image
first_item$y # Label index
lfw$classes[first_item$y] # person's name (e.g., "Aaron_Eckhart")
# Load training data for LFW Pairs Dataset
lfw <- lfw_pairs_dataset(download = TRUE, train = TRUE)
first_item <- lfw[1]
first_item$x # List of 2 RGB Images
first_item$x[[1]] # RGB Image
first_item$x[[2]] # RGB Image
first_item$y # Label index
lfw$classes[first_item$y] # Class Name (e.g., "Same" or "Different")
# Load test data for LFW Pairs Dataset
lfw <- lfw_pairs_dataset(download = TRUE, train = FALSE)
first_item <- lfw[1]
first_item$x # List of 2 RGB Images
first_item$x[[1]] # RGB Image
first_item$x[[2]] # RGB Image
first_item$y # Label index
lfw$classes[first_item$y] # Class Name (e.g., "Same" or "Different")
}
Run the code above in your browser using DataLab