Created
December 1, 2021 15:15
-
-
Save alkalait/075470178ad8e75563d33a27c1eb1d62 to your computer and use it in GitHub Desktop.
Minimal ways to learn with multiple revisits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# batch, time, bands, height, width | |
B, T, C, H, W = x.shape | |
C_o = 32 # hyperparam | |
F = lambda i, o, g=1: | |
nn.Conv2d(in_channels=i, | |
out_channels=o, | |
kernel_size=3, | |
padding='same', | |
groups=g) | |
# revisit-invariant / shared: | |
f = F(C, Co) | |
x = f(x.view(B*T, C, H, W)) | |
# revisit-specific / revisit-wise: | |
f = F(T*C, T*Co, T) | |
x = f(x.view(B, T*C, H, W)) | |
# revisit-connected: | |
f = F(C, Co) | |
x = f(x) | |
# in any case | |
x = x.view(B, T, C_o, H, W) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment