diff --git a/weights/weights_tianxiaomo2my.ipynb b/weights/weights_tianxiaomo2my.ipynb deleted file mode 100644 index a085401..0000000 --- a/weights/weights_tianxiaomo2my.ipynb +++ /dev/null @@ -1,1167 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 196, - "metadata": {}, - "outputs": [], - "source": [ - "import torch" - ] - }, - { - "cell_type": "code", - "execution_count": 251, - "metadata": {}, - "outputs": [], - "source": [ - "weights = torch.load(\"weights/tianxiaomo_yolov4.pth\")" - ] - }, - { - "cell_type": "code", - "execution_count": 198, - "metadata": {}, - "outputs": [], - "source": [ - "import model" - ] - }, - { - "cell_type": "code", - "execution_count": 199, - "metadata": {}, - "outputs": [], - "source": [ - "import pandas as pd" - ] - }, - { - "cell_type": "code", - "execution_count": 212, - "metadata": {}, - "outputs": [], - "source": [ - "m = model.YOLOv4()" - ] - }, - { - "cell_type": "code", - "execution_count": 213, - "metadata": {}, - "outputs": [], - "source": [ - "weights_to_insert = m.state_dict()" - ] - }, - { - "cell_type": "code", - "execution_count": 214, - "metadata": {}, - "outputs": [], - "source": [ - "chweights = list(weights.keys())" - ] - }, - { - "cell_type": "code", - "execution_count": 215, - "metadata": {}, - "outputs": [], - "source": [ - "myweights = list(weights_to_insert.keys())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Conv 3 12:18 to 36:42" - ] - }, - { - "cell_type": "code", - "execution_count": 216, - "metadata": {}, - "outputs": [], - "source": [ - "all_shit = []" - ] - }, - { - "cell_type": "code", - "execution_count": 217, - "metadata": {}, - "outputs": [], - "source": [ - "all_shit.append((ch_d1, my_d1))" - ] - }, - { - "cell_type": "code", - "execution_count": 218, - "metadata": {}, - "outputs": [], - "source": [ - "def get_same(ch_name, my_name):\n", - " my_weights = [w for w in myweights if my_name in w]\n", - " ch_weights = [w for w in chweights if ch_name in w]\n", - "# print(len(my_weights))\n", - "# print(len(ch_weights))\n", - " assert len(my_weights) == len(ch_weights)\n", - " return list(zip(ch_weights, my_weights))" - ] - }, - { - "cell_type": "code", - "execution_count": 239, - "metadata": {}, - "outputs": [], - "source": [ - "ch2my = [\"down1.conv1\", \"backbone.d1.c1\",\n", - "\"down1.conv2\", \"backbone.d1.c2\",\n", - "\"down1.conv3\", \"backbone.d1.dense_c3_c6\",\n", - "\"down1.conv4\", \"backbone.d1.c3\",\n", - "\"down1.conv5\", \"backbone.d1.c4\",\n", - "\"down1.conv6\", \"backbone.d1.c5\",\n", - "\"down1.conv7\", \"backbone.d1.c6\",\n", - "\"down1.conv8\", \"backbone.d1.c7\",\n", - "\n", - "#SAME FOR d3 d4 d5\n", - "\"down2.conv1\", \"backbone.d2.c1\",\n", - "\"down2.conv2\", \"backbone.d2.c2\",\n", - "\"down2.conv3\", \"backbone.d2.dense_c2_c4\",\n", - "\"down2.resblock\", \"backbone.d2.r3\",\n", - "\"down2.conv4\", \"backbone.d2.c4\",\n", - "\"down2.conv5\", \"backbone.d2.c5\",\n", - "\n", - "\"down3.conv1\", \"backbone.d3.c1\",\n", - "\"down3.conv2\", \"backbone.d3.c2\",\n", - "\"down3.conv3\", \"backbone.d3.dense_c2_c4\",\n", - "\"down3.resblock\", \"backbone.d3.r3\",\n", - "\"down3.conv4\", \"backbone.d3.c4\",\n", - "\"down3.conv5\", \"backbone.d3.c5\",\n", - "\n", - "\"down4.conv1\", \"backbone.d4.c1\",\n", - "\"down4.conv2\", \"backbone.d4.c2\",\n", - "\"down4.conv3\", \"backbone.d4.dense_c2_c4\",\n", - "\"down4.resblock\", \"backbone.d4.r3\",\n", - "\"down4.conv4\", \"backbone.d4.c4\",\n", - "\"down4.conv5\", \"backbone.d4.c5\",\n", - "\n", - "\"down5.conv1\", \"backbone.d5.c1\",\n", - "\"down5.conv2\", \"backbone.d5.c2\",\n", - "\"down5.conv3\", \"backbone.d5.dense_c2_c4\",\n", - "\"down5.resblock\", \"backbone.d5.r3\",\n", - "\"down5.conv4\", \"backbone.d5.c4\",\n", - "\"down5.conv5\", \"backbone.d5.c5\",\n", - "\n", - "\"neek.conv1.\", \"neck.c1.\",\n", - "\"neek.conv2.\", \"neck.c2.\",\n", - "\"neek.conv3.\", \"neck.c3.\",\n", - "\"neek.conv4.\", \"neck.c5.\",\n", - "\"neek.conv5.\", \"neck.c6.\",\n", - "\"neek.conv6.\", \"neck.c7.\",\n", - "\n", - "\"neek.conv7.\", \"neck.PAN8.c1\",\n", - "\"neek.conv8.\", \"neck.PAN8.c2_from_upsampled\",\n", - "\"neek.conv9.\", \"neck.PAN8.c3\",\n", - "\"neek.conv10.\", \"neck.PAN8.c4\",\n", - "\"neek.conv11.\", \"neck.PAN8.c5\",\n", - "\"neek.conv12.\", \"neck.PAN8.c6\",\n", - "\"neek.conv13.\", \"neck.PAN8.c7\",\n", - "\n", - "\"neek.conv14\", \"neck.PAN9.c1\",\n", - "\"neek.conv15\", \"neck.PAN9.c2_from_upsampled\",\n", - "\"neek.conv16\", \"neck.PAN9.c3\",\n", - "\"neek.conv17\", \"neck.PAN9.c4\",\n", - "\"neek.conv18.\", \"neck.PAN9.c5\",\n", - "\"neek.conv19.\", \"neck.PAN9.c6\",\n", - "\"neek.conv20.\", \"neck.PAN9.c7\",\n", - "\n", - "\"head.conv1.\", \"head.ho1.c1\",\n", - "\"head.conv2.\", \"head.ho1.c2\",\n", - "\n", - "\"head.conv3.\", \"head.hp2.c1\",\n", - "\"head.conv4.\", \"head.hp2.c2\",\n", - "\"head.conv5.\", \"head.hp2.c3\",\n", - "\"head.conv6.\", \"head.hp2.c4\",\n", - "\"head.conv7.\", \"head.hp2.c5\",\n", - "\"head.conv8.\", \"head.hp2.c6\",\n", - "\n", - "\"head.conv9.\", \"head.ho2.c1\",\n", - "\"head.conv10.\", \"head.ho2.c2\",\n", - "\n", - "\"head.conv11.\", \"head.hp3.c1\",\n", - "\"head.conv12.\", \"head.hp3.c2\",\n", - "\"head.conv13.\", \"head.hp3.c3\",\n", - "\"head.conv14.\", \"head.hp3.c4\",\n", - "\"head.conv15.\", \"head.hp3.c5\",\n", - "\"head.conv16.\", \"head.hp3.c6\",\n", - "\n", - "\"head.conv17.\", \"head.ho3.c1\",\n", - "\"head.conv18.\", \"head.ho3.c2\"]" - ] - }, - { - "cell_type": "code", - "execution_count": 246, - "metadata": {}, - "outputs": [], - "source": [ - "list_c2m = []\n", - "for ch, my in list(zip(ch2my[::2], ch2my[1::2])):\n", - " list_c2m += get_same(ch, my)" - ] - }, - { - "cell_type": "code", - "execution_count": 247, - "metadata": {}, - "outputs": [], - "source": [ - "dict_c2m = dict(list_c2m)" - ] - }, - { - "cell_type": "code", - "execution_count": 248, - "metadata": {}, - "outputs": [], - "source": [ - "new_weights = dict((dict_c2m[wname], w) for (wname, w) in weights.items())" - ] - }, - { - "cell_type": "code", - "execution_count": 249, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 249, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "m.load_state_dict(new_weights)" - ] - }, - { - "cell_type": "code", - "execution_count": 250, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "YOLOv4(\n", - " (backbone): Backbone(\n", - " (d1): DownSampleFirst(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(3, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(32, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c3): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 32, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(32, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c6): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (dense_c3_c6): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c7): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (d2): DownSampleBlock(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (r3): ResBlock(\n", - " (module_list): ModuleList(\n", - " (0): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (1): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " )\n", - " )\n", - " (c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (dense_c2_c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (d3): DownSampleBlock(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (r3): ResBlock(\n", - " (module_list): ModuleList(\n", - " (0): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (1): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (2): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (3): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (4): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (5): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (6): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (7): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " )\n", - " )\n", - " (c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (dense_c2_c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (d4): DownSampleBlock(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (r3): ResBlock(\n", - " (module_list): ModuleList(\n", - " (0): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (1): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (2): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (3): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (4): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (5): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (6): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (7): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " )\n", - " )\n", - " (c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (dense_c2_c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (d5): DownSampleBlock(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 1024, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (r3): ResBlock(\n", - " (module_list): ModuleList(\n", - " (0): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (1): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (2): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " (3): ModuleList(\n", - " (0): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " )\n", - " )\n", - " (c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (dense_c2_c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): Mish()\n", - " )\n", - " )\n", - " )\n", - " )\n", - " (neck): Neck(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c3): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (mp4_1): MaxPool2d(kernel_size=5, stride=1, padding=2, dilation=1, ceil_mode=False)\n", - " (mp4_2): MaxPool2d(kernel_size=9, stride=1, padding=4, dilation=1, ceil_mode=False)\n", - " (mp4_3): MaxPool2d(kernel_size=13, stride=1, padding=6, dilation=1, ceil_mode=False)\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(2048, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c6): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c7): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (PAN8): PAN_Layer(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (u2): Upsample(scale_factor=2.0, mode=nearest)\n", - " (c2_from_upsampled): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c3): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c6): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c7): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " )\n", - " (PAN9): PAN_Layer(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (u2): Upsample(scale_factor=2.0, mode=nearest)\n", - " (c2_from_upsampled): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c3): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c6): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c7): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " )\n", - " )\n", - " (head): Head(\n", - " (ho1): HeadOutput(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 255, kernel_size=(1, 1), stride=(1, 1))\n", - " )\n", - " )\n", - " )\n", - " (hp2): HeadPreprocessing(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c3): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c6): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " )\n", - " (ho2): HeadOutput(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 255, kernel_size=(1, 1), stride=(1, 1))\n", - " )\n", - " )\n", - " )\n", - " (hp3): HeadPreprocessing(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c3): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c4): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c5): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c6): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n", - " (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " )\n", - " (ho3): HeadOutput(\n", - " (c1): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(512, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n", - " (1): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n", - " (2): LeakyReLU(negative_slope=0.1, inplace=True)\n", - " )\n", - " )\n", - " (c2): ConvBlock(\n", - " (module): Sequential(\n", - " (0): Conv2d(1024, 255, kernel_size=(1, 1), stride=(1, 1))\n", - " )\n", - " )\n", - " )\n", - " )\n", - " (yolo1): YOLOLayer()\n", - " (yolo2): YOLOLayer()\n", - " (yolo3): YOLOLayer()\n", - ")" - ] - }, - "execution_count": 250, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "torch.save(new_weights)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -}