regnet

 

两个设计空间设计:AnyNet 和 RegNet

regnet_第1张图片

Pytorch implementation of network design paradigm described in the paper "Designing Network Design Spaces"

https://github.com/signatrix/regnet

 

Not Totally Accurate [RegNet: Multimodal Sensor Registration Using Deep Neural Networks] PyTorch Implementation

https://github.com/aaronlws95/regnet

 

计算参数量的:

pthflops

测试,支持6个batch-size,60ms

640返回的参数:

0 torch.Size([1, 32, 320, 320])
1 torch.Size([1, 32, 160, 160])
2 torch.Size([1, 80, 80, 80])
3 torch.Size([1, 192, 40, 40])

"""
@author: Signatrix GmbH
Implementation of paradigm described in paper: Designing Network Design Spaces published by Facebook AI Research (FAIR)
"""
import torch
from torchsummary import summary
from pthflops import count_ops
from src.regnet import RegNet
from src.config import INPUT_RESOLUTION


if __name__ == '__main__':
    bottleneck_ratio = 1
    group_width = 16
    initial_width = 32
    slope = 5
    quantized_param = 2.5
    network_depth = 40
    stride = 2
    model = RegNet(initial_width, slope, quantized_param, network_depth, bottleneck_ratio, group_width, stride)
    # model.cuda()
    dummy_images = torch.rand(6, 3, INPUT_RESOLUTION, INPUT_RESOLUTION)
    dummy_images = dummy_images.cuda()

    model=model.cuda()
    import time
    for i in range(10):
        start = time.time()
        out = model(dummy_images)
        print(time.time() - start, out.size())

    # count_ops(model, dummy_images, verbose=False)
    # for _ in range(100000):
    #     out = model(dummy_images)
    # summary(model, (3, INPUT_RESOLUTION, INPUT_RESOLUTION), device="cpu")

 

你可能感兴趣的:(深度学习)