Skip to content

Head 1x1 convolution#189

Merged
sdatkinson merged 11 commits into
sdatkinson:mainfrom
jfsantos:head1x1
Jan 19, 2026
Merged

Head 1x1 convolution#189
sdatkinson merged 11 commits into
sdatkinson:mainfrom
jfsantos:head1x1

Conversation

@jfsantos

Copy link
Copy Markdown
Contributor

Added a head1x1 convolution layer which processes the output of each layer contributions to the final model output. This updates Wavenet and LayerArray to take a Head1x1Params struct that is used to configure head1x1.

Developed with support and sponsorship from TONE3000

@jfsantos

Copy link
Copy Markdown
Contributor Author

Tests passing, @sdatkinson this is ready for review!

@sdatkinson sdatkinson left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty good. One crit on a += that I think snuck in.

Comment thread CMakeLists.txt
endif()

set(NAM_DEPS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies")
include_directories(SYSTEM "${NAM_DEPS_PATH}/eigen")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting that this wasn't(?) a (big?) problem previously. But I'm not great at CMake :)

Comment thread NAM/wavenet.cpp Outdated
Comment thread NAM/wavenet.cpp
const int bottleneck = layer_config.value("bottleneck", channels); // defaults to channels if not present

// Parse head1x1 parameters
bool head1x1_active = layer_config.value("head1x1_active", false);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: if head1x1_active==true, then we shouldn't allow for defaults (we'll make sure they're provided nicely in the trainer).

Nit because it'll still work for now; I just like loud failures :)

Comment thread NAM/wavenet.h Outdated
Comment thread NAM/wavenet.h Outdated
Comment thread tools/test/test_wavenet/test_full.cpp Outdated
Comment thread tools/test/test_wavenet/test_head1x1.cpp
@jfsantos jfsantos requested a review from sdatkinson January 19, 2026 22:32

@sdatkinson sdatkinson left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good 👍🏻

@sdatkinson sdatkinson merged commit d1ffcb3 into sdatkinson:main Jan 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants