首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Github 项目推荐 | 用 Pytorch 实现的 Capsule Network

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

作者头像
AI研习社
发布2018-03-28 09:47:55
1.1K0
发布2018-03-28 09:47:55
举报
文章被收录于专栏:AI研习社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

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2018-03-08,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 AI研习社 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档