Table of Contents
Shortcuts

# Flickr8k

class torchvision.datasets.Flickr8k(root: str, ann_file: str, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None)

  Flickr8k Entities Dataset.

  Parameters:

    - root (string) – Root directory where images are downloaded to.

    - ann_file (string) – Path to annotation file.

    - transform (callable, optional) – A function/transform that takes in a PIL image and returns a transformed version. E.g, `transforms.PILToTensor`

    - target_transform (callable, optional) – A function/transform that takes in the target and transforms it.

  Special-members:

  __getitem__(index: int) → Tuple[Any, Any]
    Parameters:

      index (int) – Index

    Returns:

      Tuple (image, target). target is a list of captions for the image.

    Return type:

      tuple

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.