Repository navigation
Frame generation: CPU reference of the networks' building blocks - #153
Merged
Merged
Conversation
clean/fg/reference/ops.py (NumPy, float64 with the float16 roundings): float16 convolution (3x3, 1x1) with bias and ReLU, 2x pooling, bilinear 2x upscale in the align-corners form, element-wise combines, net1's input features (luma, warp error, mask pair) and the 2x2 fold into 48-value cells. Behaviour not yet delivered is a required argument (border rule, ReLU per layer, pooling kind, channel and fold order) or raises OpenItem (float16 accumulation order, both networks' wiring). FORMATS.md lists them. Refs #96 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
marked this pull request as ready for review
November 14, 2026 07:59
Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
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.
A NumPy CPU reference for the building blocks of frame generation's two convolution networks (lane h). It follows #148, which added the FG weight layout and converter preset.
clean/fg/reference/ops.py(float64 arithmetic with only the float16 roundings, like the other oracles here)weight_shape(layer)gives the canonical weight shape[out, k, k, in]for every layer ofclean/fg/layout.py.Behaviour the spec side has not delivered is never guessed:
pad: zero, replicate or mirror), ReLU after a net2 layer (relu_after), the pooling kind (max or avg), net1's feature channel order, and the fold order inside a cell.OpenItem: float16 accumulation in the matrix unit's order (acc="f16"), net1 blob 2 (1×1 or 2×2), and both networks end to end (net1_forward,net2_forward).clean/fg/FORMATS.mdlists every OPEN item.Refs #96
Tested
python -m unittest clean.fg.tests.test_fg_reference clean.fg.tests.test_fg_layout: 18 tests pass locally.clean/fg.Not tested