File size: 672 Bytes
d0fad33
 
 
 
 
0315c59
d0fad33
 
77f8604
0315c59
d0fad33
 
0315c59
 
d0fad33
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import torch

examples = [
    {
        'name': 'lincoln.jpg',
        'url': 'https://cdn.britannica.com/09/149309-050-8859A04A/Abraham-Lincoln-photograph-Mathew-Brady-1864.jpg'
    },
    {
        'name': 'taylor_momsen.jpg',
        'url': 'https://ts4.tc.mm.bing.net/th/id/OIP-C.2O41IrNLVYJ3l8H1XhDOfgHaLH?cb=defcache2defcache=1&rs=1&pid=ImgDetMain&o=7&rm=3'
    },
    {
        'name': 'leonardo.jpg',
        'url': 'https://ts4.tc.mm.bing.net/th/id/OIP-C.Z_FHUynw1vRHk6dLbwr05gAAAA?cb=defcache2defcache=1&rs=1&pid=ImgDetMain&o=7&rm=3'
    }
]


def download():
    for example in examples:
        torch.hub.download_url_to_file(example['url'], example['name'])