Update tensormapper.py
Browse files- tensormapper.py +3 -3
tensormapper.py
CHANGED
|
@@ -73,7 +73,7 @@ class TTT(nn.Module):
|
|
| 73 |
|
| 74 |
|
| 75 |
class TensorMapperBlock(nn.Module):
|
| 76 |
-
def __init__(self, dim
|
| 77 |
|
| 78 |
super().__init__()
|
| 79 |
|
|
@@ -107,11 +107,11 @@ class TensorMapperBlock(nn.Module):
|
|
| 107 |
|
| 108 |
|
| 109 |
class TensorMapper(nn.Module):
|
| 110 |
-
def __init__(self, d_model,
|
| 111 |
super().__init__()
|
| 112 |
|
| 113 |
self.model = nn.Sequential(
|
| 114 |
-
*[TensorMapperBlock(d_model
|
| 115 |
)
|
| 116 |
|
| 117 |
def forward(self, x):
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
class TensorMapperBlock(nn.Module):
|
| 76 |
+
def __init__(self, dim):
|
| 77 |
|
| 78 |
super().__init__()
|
| 79 |
|
|
|
|
| 107 |
|
| 108 |
|
| 109 |
class TensorMapper(nn.Module):
|
| 110 |
+
def __init__(self, d_model, num_layers):
|
| 111 |
super().__init__()
|
| 112 |
|
| 113 |
self.model = nn.Sequential(
|
| 114 |
+
*[TensorMapperBlock(d_model) for _ in range(num_layers)]
|
| 115 |
)
|
| 116 |
|
| 117 |
def forward(self, x):
|