-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BatchDotGrad] Implement other parameterized layers, add tests
- Loading branch information
Showing
9 changed files
with
176 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from backpack.core.derivatives.batchnorm1d import BatchNorm1dDerivatives | ||
from backpack.extensions.firstorder.batch_dot_grad.base import BatchDotGradBase | ||
|
||
|
||
class BatchDotGradBatchNorm1d(BatchDotGradBase): | ||
def __init__(self): | ||
super().__init__( | ||
derivatives=BatchNorm1dDerivatives(), params=["bias", "weight"] | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from backpack.core.derivatives.conv1d import Conv1DDerivatives | ||
from backpack.extensions.firstorder.batch_dot_grad.base import BatchDotGradBase | ||
|
||
|
||
class BatchDotGradConv1d(BatchDotGradBase): | ||
def __init__(self): | ||
super().__init__(derivatives=Conv1DDerivatives(), params=["bias", "weight"]) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from backpack.core.derivatives.conv2d import Conv2DDerivatives | ||
from backpack.extensions.firstorder.batch_dot_grad.base import BatchDotGradBase | ||
|
||
|
||
class BatchDotGradConv2d(BatchDotGradBase): | ||
def __init__(self): | ||
super().__init__(derivatives=Conv2DDerivatives(), params=["bias", "weight"]) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from backpack.core.derivatives.conv3d import Conv3DDerivatives | ||
from backpack.extensions.firstorder.batch_dot_grad.base import BatchDotGradBase | ||
|
||
|
||
class BatchDotGradConv3d(BatchDotGradBase): | ||
def __init__(self): | ||
super().__init__(derivatives=Conv3DDerivatives(), params=["bias", "weight"]) |
9 changes: 9 additions & 0 deletions
9
backpack/extensions/firstorder/batch_dot_grad/conv_transpose1d.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from backpack.core.derivatives.conv_transpose1d import ConvTranspose1DDerivatives | ||
from backpack.extensions.firstorder.batch_dot_grad.base import BatchDotGradBase | ||
|
||
|
||
class BatchDotGradConvTranspose1d(BatchDotGradBase): | ||
def __init__(self): | ||
super().__init__( | ||
derivatives=ConvTranspose1DDerivatives(), params=["bias", "weight"] | ||
) |
9 changes: 9 additions & 0 deletions
9
backpack/extensions/firstorder/batch_dot_grad/conv_transpose2d.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from backpack.core.derivatives.conv_transpose2d import ConvTranspose2DDerivatives | ||
from backpack.extensions.firstorder.batch_dot_grad.base import BatchDotGradBase | ||
|
||
|
||
class BatchDotGradConvTranspose2d(BatchDotGradBase): | ||
def __init__(self): | ||
super().__init__( | ||
derivatives=ConvTranspose2DDerivatives(), params=["bias", "weight"] | ||
) |
9 changes: 9 additions & 0 deletions
9
backpack/extensions/firstorder/batch_dot_grad/conv_transpose3d.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from backpack.core.derivatives.conv_transpose3d import ConvTranspose3DDerivatives | ||
from backpack.extensions.firstorder.batch_dot_grad.base import BatchDotGradBase | ||
|
||
|
||
class BatchDotGradConvTranspose3d(BatchDotGradBase): | ||
def __init__(self): | ||
super().__init__( | ||
derivatives=ConvTranspose3DDerivatives(), params=["bias", "weight"] | ||
) |
This file contains 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