From 4670d375c6ac37457094fa5519079936328d1e67 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Thu, 7 Jul 2022 15:21:29 -0700 Subject: [PATCH] Reorg benchmark.py import --- benchmark.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/benchmark.py b/benchmark.py index 74f09489..23047bb5 100755 --- a/benchmark.py +++ b/benchmark.py @@ -6,24 +6,23 @@ An inference and train step benchmark script for timm models. Hacked together by Ross Wightman (https://github.com/rwightman) """ import argparse -import os import csv import json -import time import logging -import torch -import torch.nn as nn -import torch.nn.parallel +import time from collections import OrderedDict from contextlib import suppress from functools import partial +import torch +import torch.nn as nn +import torch.nn.parallel + +from timm.data import resolve_data_config from timm.models import create_model, is_model, list_models from timm.optim import create_optimizer_v2 -from timm.data import resolve_data_config from timm.utils import setup_default_logging, set_jit_fuser - has_apex = False try: from apex import amp