data_loader.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:pytorch-tutorial 作者: yunjey 项目源码 文件源码
def __init__(self, root, json, vocab, transform=None):
        """Set the path for images, captions and vocabulary wrapper.

        Args:
            root: image directory.
            json: coco annotation file path.
            vocab: vocabulary wrapper.
            transform: image transformer.
        """
        self.root = root
        self.coco = COCO(json)
        self.ids = list(self.coco.anns.keys())
        self.vocab = vocab
        self.transform = transform
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号