-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core principles #53
Comments
I agree with everything. It seems like a lot but I don't think it will be too bad. I think with the partioning we should probably have a library of partitions, checkerboard will be one and they are somehow specified as part of the layer. btw this reminds me that there is an API which would mean you could call anvil like |
The API sounds very useful.
Yeah exactly. The easiest thing would be to allow each layer to posses either a generalisation of What I'm thinking about is actually dedicated layers for partitioning the fields, that are nn.Modules so can form part of the chain. Then the layers just receive the active and passive partitions as separate inputs. In that case we would want to be able to sandwich multiple layers between split-join operations. I guess the ideal way to write this in a runcard would be using syntax like
But I guess with yaml we would end up with the less attractive - global_transformation_layer
- partitioning_scheme: 1
layers:
- coupling_block_1
- partitioning_scheme: 2
layers:
- coupling_block_2
- coupling_block_2
- inverse_global_transformation_layer where layers (e.g. I'm just trying to thought-experiment how this would work. I failed to get something similar to work in #46 . If you wanted to keep the flow 'flat' you could do - global_transformation_layer
- partitioning_scheme_1
- coupling_block_1
- partitioning_scheme_2
- coupling_block_2
- coupling_block_2
- undo_partitioning_scheme_2
- undo_partitioning_scheme_1
- inverse_global_transformation_layer but this is risky I think. |
Why do you say it's risky? |
Hmm partly because it relies on the user to do things in the right order. Also in the nested case I think we could have one nn.Module that does both the splitting and the joining, that works like class partitioning_scheme(nn.Module):
def __init__(self, nested_layers, *args_for_partitioning):
...
def forward(self, input_tensor, unused_partition):
z_a, z_b = self.split(input_tensor)
phi_a, phi_b = self.nested_layers(z_a, z_b)
output_tensor = self.join(phi_a, phi_b)
return output_tensor, unused_partition instead of having two different nn.Modules which don't share |
remember we can add checks to enforce certain rules. Although I do think nested might just work better here. |
I think we're closer to this. Would be nice to expand this: https://wilsonmr.github.io/anvil/get-started/basic-usage.html to include some of what you say, and perhaps help a bit more with the core objects part. Also the reportengine actions are still a bit obfuscated I think I should add a bit more explanation of how this work. |
There's a lot of work that needs doing to move this project forward. Feeling somewhat paralysed by considering, in isolation, what we could do, I tried to write down what I thought were the core principles of this project -- i.e. the things we really care about and want to work as well as possible. Sometimes a compass is more useful than a map!
I think it might be useful to have this in writing and check that we're in agreement, for the most part.
The text was updated successfully, but these errors were encountered: