File tree Expand file tree Collapse file tree
PyTorch/Classification/GPUNet/configs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515import os
1616import torch
17- from ..models .gpunet_builder import GPUNet_Builder
18- from .model_hub import get_configs , MODEL_ZOO_NAME2TYPE_B1
19- from timm .models .helpers import load_checkpoint
2017
2118def nvidia_gpunet (pretrained = True , ** kwargs ):
2219 """Constructs a gpunet model (nn.module with additional infer(input) method).
@@ -27,6 +24,11 @@ def nvidia_gpunet(pretrained=True, **kwargs):
2724 model_math (str, 'fp32'): returns a model in given precision ('fp32' or 'fp16'). Precision fp32 only gpunets
2825 model_type (str, 'GPUNet-0'): loads selected model type GPUNet-1.... or GPUNet-P1 or DPUNet-D3. Defaults to GPUNet-0
2926 """
27+
28+ from ..models .gpunet_builder import GPUNet_Builder
29+ from .model_hub import get_configs , MODEL_ZOO_NAME2TYPE_B1
30+ from timm .models .helpers import load_checkpoint
31+
3032 modelType = kwargs .get ('model_type' , 'GPUNet-0' )
3133 print ("model_type=" , modelType )
3234
@@ -63,4 +65,4 @@ def nvidia_gpunet(pretrained=True, **kwargs):
6365
6466 model = model .to ("cuda" , modelMath )
6567
66- return model
68+ return model
You can’t perform that action at this time.
0 commit comments