Remove .autoshape() method (#5694)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-11-20 01:11:36 +01:00
1 parent 36d12a500e
commit 46daa7b78d
3 files changed
+6 -14

No files matched your search

+1 -8
View File
@@ -22,8 +22,7 @@ from models.experimental import *
from utils.autoanchor import check_anchor_order
from utils.general import LOGGER, check_version, check_yaml, make_divisible, print_args
from utils.plots import feature_visualization
from utils.torch_utils import (copy_attr, fuse_conv_and_bn, initialize_weights, model_info, scale_img, select_device,
time_sync)
from utils.torch_utils import fuse_conv_and_bn, initialize_weights, model_info, scale_img, select_device, time_sync
try:
import thop # for FLOPs computation
@@ -226,12 +225,6 @@ class Model(nn.Module):
self.info()
return self
def autoshape(self): # add AutoShape module
LOGGER.info('Adding AutoShape... ')
m = AutoShape(self) # wrap model
copy_attr(m, self, include=('yaml', 'nc', 'hyp', 'names', 'stride'), exclude=()) # copy attributes
return m
def info(self, verbose=False, img_size=640): # print model information
model_info(self, verbose, img_size)