if (FALSE) {
# Load the Flickr8k caption dataset
flickr8k <- flickr8k_caption_dataset(download = TRUE)
# Access the first item
first_item <- flickr8k[1]
first_item$x # image array with shape {3, H, W}
first_item$y # character vector containing five captions.
# Load the Flickr30k caption dataset
flickr30k <- flickr30k_caption_dataset(download = TRUE)
# Access the first item
first_item <- flickr30k[1]
first_item$x # image array with shape {3, H, W}
first_item$y # character vector containing five captions.
}
Run the code above in your browser using DataLab