Skip to content
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

Raft refacto #128

Merged
merged 8 commits into from
Nov 12, 2021
Merged

Raft refacto #128

merged 8 commits into from
Nov 12, 2021

Conversation

jsalotti
Copy link
Contributor

@jsalotti jsalotti commented Nov 5, 2021

Make code more generic and readable :

  • the class of correlation block can be given as a parameter of the constructor
  • flow upsampling logic is factorized in method upsample_flow()
  • the outputs of an update step are regrouped in a dict ;
  • at each update step, the output dict is appended to list m_outputs
  • the processing after last update step is factorized in forward_head
  • out_plane allows to predict a map of vectors of different sizes (1D, 2D, 3D, etc.)
  • added properties hdim and cdim as short_names for hidden_dim and context_dim

Better implementation for abstract class attributes :

  • declare abstract attribute in parent class with my_attribute = abstract_attribute()
  • check that abstract attributes are instantiated in child class by overriding parent class __new__ method
  • two methods are provided to easily override __new__ : check_abstract_attribute_instanciation and super_new

@jsalotti jsalotti added the alonet label Nov 5, 2021
@jsalotti jsalotti self-assigned this Nov 5, 2021
@thibo73800
Copy link
Contributor

@jsalotti can you provide a description of the changes ?

alonet/raft/raft.py Outdated Show resolved Hide resolved
alonet/raft/raft.py Show resolved Hide resolved
@thibo73800 thibo73800 merged commit 717b6b6 into master Nov 12, 2021
@thibo73800 thibo73800 deleted the raft_refacto branch November 16, 2021 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants