Skip to content

Instantly share code, notes, and snippets.

@kendricktan
kendricktan / capsule_networks.py
Last active August 17, 2021 17:12
Clean Code for Capsule Networks
"""
Dynamic Routing Between Capsules
https://arxiv.org/abs/1710.09829
"""
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvision.transforms as transforms
@calebhearth
calebhearth / gist:4625280
Created January 24, 2013 17:15
Switch back and forth between directories and git branches, and even merge the last branch you were on, with hyphen!
~/
↪ cd code/project
project[master]/
↪ cd -
~/
↪ cd code/project
project[master]/