Add Adaptive Computation Time (ACT) layer#3111
Merged
Merged
Conversation
…des an optimized linear transformation for multi-dimensional inputs.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tion-free tokenization
davisking
reviewed
Sep 6, 2025
davisking
reviewed
Sep 6, 2025
Repository owner
deleted a comment
Sep 18, 2025
Owner
|
Nice, this is great. Thanks for the PR :D |
Contributor
Author
|
No problem. My next plan is to work on a native Transformer implementation to make them easier to use within Dlib. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement adaptive_computation_time_ layer following Graves (2016) "Adaptive Computation Time for Recurrent Neural Networks".
This layer enables neural networks to adaptively determine the number of computation steps to perform for each sequence position, spending more computation on difficult parts while quickly processing easier parts.
Key features:
Note: This ACT implementation can serve as a building block for hierarchical reasoning mechanisms such as those described in "Hierarchical Reasoning Model" (Wang et al., 2025, arXiv:2506.21734) for advanced sequential reasoning tasks.