generated from kyegomez/Python-Package-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Mar 26, 2024
1 parent
023d3e2
commit 2cb0c06
Showing
4 changed files
with
342 additions
and
28 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,22 @@ | ||
import torch | ||
from simba_torch.main import Simba | ||
|
||
# Forward pass with images | ||
img = torch.randn(1, 3, 224, 224) | ||
|
||
# Create model | ||
model = Simba( | ||
dim = 4, # Dimension of the transformer | ||
dropout = 0.1, # Dropout rate for regularization | ||
d_state=64, # Dimension of the transformer state | ||
d_conv=64, # Dimension of the convolutional layers | ||
num_classes=64, # Number of output classes | ||
depth=8, # Number of transformer layers | ||
patch_size=16, # Size of the image patches | ||
image_size=224, # Size of the input image | ||
channels=3, # Number of input channels | ||
) | ||
|
||
# Forward pass | ||
out = model(img) | ||
print(out.shape) |
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
Oops, something went wrong.