-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kye
committed
May 12, 2024
1 parent
b9abb28
commit 743dbba
Showing
4 changed files
with
15 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
from zeta.nn import FractoralNorm # Importing the FractoralNorm class from the zeta.nn module | ||
from zeta.nn import ( | ||
FractoralNorm, | ||
) # Importing the FractoralNorm class from the zeta.nn module | ||
import torch # Importing the torch module for tensor operations | ||
|
||
# Norm | ||
x = torch.randn(2, 3, 4) # Generating a random tensor of size (2, 3, 4) | ||
|
||
# FractoralNorm | ||
normed = FractoralNorm(4, 4)(x) # Applying the FractoralNorm operation to the tensor x | ||
normed = FractoralNorm(4, 4)( | ||
x | ||
) # Applying the FractoralNorm operation to the tensor x | ||
|
||
print(normed) # Printing the size of the resulting tensor, which should be torch.Size([2, 3, 4]) | ||
print( | ||
normed | ||
) # Printing the size of the resulting tensor, which should be torch.Size([2, 3, 4]) |
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
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