Skip to content

Commit

Permalink
add regularization params to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
retraigo committed Sep 4, 2024
1 parent a201646 commit 14093db
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/core/api/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ export type DenseLayerConfig = {
* The size of the layer.
*/
size: Shape1D;

/**
* Inverse of regularization strength.
*/
c?: number;

/**
* Ratio of l1:l2.
*/
l1Ratio?: number;
};

/**
Expand Down Expand Up @@ -86,6 +96,16 @@ export type Conv2DLayerConfig = {
* The optional strides to use.
*/
strides?: Shape2D;

/**
* Inverse of regularization strength.
*/
c?: number;

/**
* Ratio of l1:l2.
*/
l1Ratio?: number;
};

/**
Expand All @@ -111,6 +131,16 @@ export type ConvTranspose2DLayerConfig = {
* The optional strides to use.
*/
strides?: Shape2D;

/**
* Inverse of regularization strength.
*/
c?: number;

/**
* Ratio of l1:l2.
*/
l1Ratio?: number;
};

export enum PoolMode {
Expand Down

0 comments on commit 14093db

Please sign in to comment.