updates
This commit is contained in:
1 parent
a88cdd25d7
commit
1b97392801
5 files changed
+4
-160
No files matched your search
+4
-4
@@ -122,7 +122,7 @@ def parse_model(md, ch): # model_dict, input_channels(3)
|
||||
pass
|
||||
|
||||
n = max(round(n * gd), 1) if n > 1 else n # depth gain
|
||||
if m in [nn.Conv2d, Conv, Bottleneck, SPP, DWConv, MixConv2d, Focus, ConvPlus, BottleneckCSP, BottleneckCSPF, BottleneckLight]:
|
||||
if m in [nn.Conv2d, Conv, Bottleneck, SPP, DWConv, MixConv2d, Focus, ConvPlus, BottleneckCSP, BottleneckLight]:
|
||||
c1, c2 = ch[f], args[0]
|
||||
|
||||
# Normal
|
||||
@@ -143,8 +143,8 @@ def parse_model(md, ch): # model_dict, input_channels(3)
|
||||
# c2 = make_divisible(c2, 8) if c2 != no else c2
|
||||
|
||||
args = [c1, c2, *args[1:]]
|
||||
if m in [BottleneckCSP, BottleneckCSPF]:
|
||||
args += [n]
|
||||
if m is BottleneckCSP:
|
||||
args.insert(2, n)
|
||||
n = 1
|
||||
elif m is nn.BatchNorm2d:
|
||||
args = [ch[f]]
|
||||
@@ -170,7 +170,7 @@ def parse_model(md, ch): # model_dict, input_channels(3)
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--cfg', type=str, default='yolov5s.yaml', help='model.yaml')
|
||||
parser.add_argument('--cfg', type=str, default='yolov5s_csp.yaml', help='model.yaml')
|
||||
parser.add_argument('--device', default='', help='cuda device, i.e. 0 or 0,1,2,3 or cpu')
|
||||
opt = parser.parse_args()
|
||||
opt.cfg = glob.glob('./**/' + opt.cfg, recursive=True)[0] # find file
|
||||
|
||||
Reference in new issue
Block a user