SSD_300_vggmodel,包含两种ssd300: Model Training data Testing data mAP SSD-300 VGG-based VOC07+12+COCO trainval VOC07 test SSD-300 VGG-based VOC07+12 trainval VOC07 test -
如下所示:
#获取模型权重
for k, v in model_2.state_dict().iteritems():
print("Layer {}".format(k))
print(v)
#获取模型权重
for layer in model_2.modules():
if isinstance(layer, nn.Linear):
print(layer.weight)
#将一个模型权重载入另一个模型
model = VGG(make_layers(cfg['E']),
最近使用pytorch时,需要用到一个预训练好的人脸识别模型提取人脸ID特征,想到很多人都在用用vgg-face,但是vgg-face没有pytorch的模型,于是写个vgg-face.mat转到pytorch模型的代码
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu May 10 10:41:40 2018
author: hy
"""
import torch
import math
import torc