Sort imports for optional third-party libraries.

These libraries aren't always installed in the virtual environment where
isort is running. Declaring them properly avoids mixing these
third-party imports with local imports.
This commit is contained in:
Aymeric Augustin
2019-12-22 11:17:48 +01:00
parent 2a34d5b71b
commit c11b3e2926
10 changed files with 28 additions and 16 deletions

View File

@@ -20,11 +20,10 @@ from collections import Counter
import torch
import torch.nn as nn
from torch.utils.data import Dataset
import torchvision
import torchvision.transforms as transforms
from PIL import Image
from torch.utils.data import Dataset
POOLING_BREAKDOWN = {1: (1, 1), 2: (2, 1), 3: (3, 1), 4: (2, 2), 5: (5, 1), 6: (3, 2), 7: (7, 1), 8: (4, 2), 9: (3, 3)}