Github 项目推荐 | 用 Pytorch 实现的 Capsule Network

2018 年 3 月 7 日 AI研习社 孔令双

本库用 Pytorch 实现的 Capsule Network 基于以下论文:

  • Dynamic Routing Between Capsules by Sara Sabour, Nicholas Frosst and Geoffrey Hinton

  • https://arxiv.org/abs/1710.09829

官方用 TensorFlow 实现的 Capsule Network 的论文地址如下:

  • https://arxiv.org/abs/1710.09829

运行

要获取关于该项目的详细信息,请运行:

python main.py --hel

重构的图像与原始图像对比:

安装需求

  • PyTorch (http://www.pytorch.org)

  • NumPy (http://www.numpy.org/)

  • GPU

默认的超参数(和论文的类似)

  • Per-GPU batch_size = 128

  • Initial learning_rate = 0.001

  • Exponential lr_decay = 0.96

  • Number of routing iteration (num_routing) = 3

损失函数超参数(请参阅 loss.py)

  • Lambda for Margin Loss = 0.5

  • Scaling factor for reconstruction loss = 0.0005

GPU Speed benchmarks

  • 单个 GeForce GTX 1080Ti - 35.6s per epoch

  • 两个 GeForce GTX 1080Ti - 35.8s per epoch(twice the batch size -> half the iteration)

Github 地址

https://github.com/danielhavir/capsule-network

NLP 工程师入门实践班:基于深度学习的自然语言处理

三大模块,五大应用,手把手快速入门 NLP

海外博士讲师,丰富项目经验

算法 + 实践,搭配典型行业应用

随到随学,专业社群,讲师在线答疑

▼▼▼




新人福利




关注 AI 研习社(okweiwu),回复  1  领取

【超过 1000G 神经网络 / AI / 大数据,教程,论文】



谷歌正式开源 Hinton 胶囊理论代码,即刻用 TensorFlow 实现吧

登录查看更多
22

相关内容

Capsule Networks,胶囊网络,57页ppt,布法罗大学
专知会员服务
69+阅读 · 2020年2月29日
Github 项目推荐 | PyTorch 实现的 GAN 文本生成框架
AI研习社
35+阅读 · 2019年6月10日
Github项目推荐 | RecQ - Python推荐系统框架
AI研习社
8+阅读 · 2019年1月23日
Github 项目推荐 | YOLOv3 的最小化 PyTorch 实现
AI研习社
25+阅读 · 2018年5月31日
VIP会员
Top
微信扫码咨询专知VIP会员