Skip to content

Commit

Permalink
autopep8 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gulin7 authored and github-actions[bot] committed Nov 27, 2024
1 parent 99d807a commit 52f5154
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/cifar10/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import torch.nn as nn
import torch.optim as optim
import utils
from torch.cuda.amp import GradScaler
from torch.amp import autocast
from torch.cuda.amp import GradScaler

import ignite
import ignite.distributed as idist
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fire
import torch
from torch.cuda.amp import GradScaler
from torch.amp import autocast
from torch.cuda.amp import GradScaler
from torch.nn import CrossEntropyLoss
from torch.optim import SGD
from torchvision.models import wide_resnet50_2
Expand Down
2 changes: 1 addition & 1 deletion examples/cifar10_qat/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import torch.nn as nn
import torch.optim as optim
import utils
from torch.cuda.amp import GradScaler
from torch.amp import autocast
from torch.cuda.amp import GradScaler

import ignite
import ignite.distributed as idist
Expand Down
2 changes: 1 addition & 1 deletion examples/references/classification/imagenet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import torch

try:
from torch.cuda.amp import GradScaler
from torch.amp import autocast
from torch.cuda.amp import GradScaler
except ImportError:
raise RuntimeError("Please, use recent PyTorch version, e.g. >=1.6.0")

Expand Down
2 changes: 1 addition & 1 deletion examples/references/segmentation/pascal_voc2012/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import torch

try:
from torch.cuda.amp import GradScaler
from torch.amp import autocast
from torch.cuda.amp import GradScaler
except ImportError:
raise RuntimeError("Please, use recent PyTorch version, e.g. >=1.6.0")

Expand Down

0 comments on commit 52f5154

Please sign in to comment.