mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Reorg benchmark.py import
This commit is contained in:
parent
500c190860
commit
4670d375c6
13
benchmark.py
13
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)
|
Hacked together by Ross Wightman (https://github.com/rwightman)
|
||||||
"""
|
"""
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
|
||||||
import csv
|
import csv
|
||||||
import json
|
import json
|
||||||
import time
|
|
||||||
import logging
|
import logging
|
||||||
import torch
|
import time
|
||||||
import torch.nn as nn
|
|
||||||
import torch.nn.parallel
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from functools import partial
|
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.models import create_model, is_model, list_models
|
||||||
from timm.optim import create_optimizer_v2
|
from timm.optim import create_optimizer_v2
|
||||||
from timm.data import resolve_data_config
|
|
||||||
from timm.utils import setup_default_logging, set_jit_fuser
|
from timm.utils import setup_default_logging, set_jit_fuser
|
||||||
|
|
||||||
|
|
||||||
has_apex = False
|
has_apex = False
|
||||||
try:
|
try:
|
||||||
from apex import amp
|
from apex import amp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user