• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

MG2033/MobileNet-V2: A Complete and Simple Implementation of MobileNet-V2 in PyT ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

MG2033/MobileNet-V2

开源软件地址(OpenSource Url):

https://github.com/MG2033/MobileNet-V2

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):

MobileNet-V2

An implementation of Google MobileNet-V2 introduced in PyTorch. According to the authors, MobileNet-V2 improves the state of the art performance of mobile models on multiple tasks and benchmarks. Its architecture is based on an inverted residual structure where the input and output of the residual block are thin bottleneck layers opposite to traditional residual models which use expanded representations in the input an MobileNetV2 uses lightweight depthwise convolutions to filter features in the intermediate expansion layer.

Link to the original paper: Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation

This implementation was made to be an example of a common deep learning software architecture. It's simple and designed to be very modular. All of the components needed for training and visualization are added.

Inverted Residuals with Linear Bottlenecks



Usage

This project uses Python 3.5.3 and PyTorch 0.3.

Main Dependencies

pytorch 0.3
numpy 1.13.1
tqdm 4.15.0
easydict 1.7
matplotlib 2.0.2
tensorboardX 1.0

Install dependencies:

pip install -r requirements.txt

Train and Test

  1. Prepare your data, then create a dataloader class such as cifar10data.py and cifar100data.py.
  2. Create a .json config file for your experiments. Use the given .json config files as a reference.

Run

python main.py config/<your-config-json-file>.json

Experiments

Due to the lack of computational power. I trained on CIFAR-10 dataset as an example to prove correctness, and was able to achieve test top1-accuracy of 90.9%.

Tensorboard Visualization

Tensorboard is integrated with the project using tensorboardX library which proved to be very useful as there is no official visualization library in pytorch.

You can start it using:

tensorboard --logdir experimenets/<config-name>/summaries

These are the learning curves for the CIFAR-10 experiment.



TODO

Measuring FLOPS on this architecture to compare with other realtime architectures. PyTorch doesn't have a profiler like TensorFlow's. So, I'll be working on measuring FLOPS on my own.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap