Skip to content

Commit

Permalink
main code
Browse files Browse the repository at this point in the history
update anchors
  • Loading branch information
WongKinYiu authored Aug 9, 2022
1 parent fef71ef commit 54d3908
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/reparameterization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"\n",
"with open('cfg/deploy/yolov7.yaml') as f:\n",
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
"anchors = len(yml['anchors'])\n",
"anchors = len(yml['anchors'][0]) // 2\n",
"\n",
"# copy intersect weights\n",
"state_dict = ckpt['model'].float().state_dict()\n",
Expand Down Expand Up @@ -100,7 +100,7 @@
"\n",
"with open('cfg/deploy/yolov7x.yaml') as f:\n",
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
"anchors = len(yml['anchors'])\n",
"anchors = len(yml['anchors'][0]) // 2\n",
"\n",
"# copy intersect weights\n",
"state_dict = ckpt['model'].float().state_dict()\n",
Expand Down Expand Up @@ -162,7 +162,7 @@
"\n",
"with open('cfg/deploy/yolov7-w6.yaml') as f:\n",
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
"anchors = len(yml['anchors'])\n",
"anchors = len(yml['anchors'][0]) // 2\n",
"\n",
"# copy intersect weights\n",
"state_dict = ckpt['model'].float().state_dict()\n",
Expand Down Expand Up @@ -248,7 +248,7 @@
"\n",
"with open('cfg/deploy/yolov7-e6.yaml') as f:\n",
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
"anchors = len(yml['anchors'])\n",
"anchors = len(yml['anchors'][0]) // 2\n",
"\n",
"# copy intersect weights\n",
"state_dict = ckpt['model'].float().state_dict()\n",
Expand Down Expand Up @@ -334,7 +334,7 @@
"\n",
"with open('cfg/deploy/yolov7-d6.yaml') as f:\n",
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
"anchors = len(yml['anchors'])\n",
"anchors = len(yml['anchors'][0]) // 2\n",
"\n",
"# copy intersect weights\n",
"state_dict = ckpt['model'].float().state_dict()\n",
Expand Down Expand Up @@ -420,7 +420,7 @@
"\n",
"with open('cfg/deploy/yolov7-e6e.yaml') as f:\n",
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
"anchors = len(yml['anchors'])\n",
"anchors = len(yml['anchors'][0]) // 2)\n",
"\n",
"# copy intersect weights\n",
"state_dict = ckpt['model'].float().state_dict()\n",
Expand Down

0 comments on commit 54d3908

Please sign in to comment.