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

Dropout Layer and Moduliarizing Activations #7

Merged
merged 3 commits into from
Nov 8, 2023
Merged

Dropout Layer and Moduliarizing Activations #7

merged 3 commits into from
Nov 8, 2023

Conversation

fszewczyk
Copy link
Owner

Dropout Layer

Introduced a Linear Dropout layer:

layerf32 = Dropout32::create(15, 5, 0.2);
layerf32 = Dropout<Type::float32>(15, 5, 0.2);
layerf32 = Dropout<float>(15, 5, 0.2);

layerf64 = Dropout64::create(15, 5, 0.2);
layerf64 = Dropout<Type::float64>(15, 5, 0.2);
layerf64 = Dropout<double>(15, 5, 0.2);

Modularizing Activations

Now each Activation is an insstance of a Module class which makes it easier to create sequential models, e.g.

auto mlp = SequentialBuilder<Type::float32>::begin()
                .add(Linear32::create(2, 15))
                .add(ReLU32::create())
                .add(Dropout32::create(15, 5, 0.2))
                .add(ReLU32::create())
                .add(Linear32::create(5, 1))
                .add(Sigmoid32::create())
                .build();

@fszewczyk fszewczyk merged commit 73cd972 into master Nov 8, 2023
3 checks 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.

1 participant