broccoli-ml 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- broccoli/vit.py +11 -11
- {broccoli_ml-0.4.0.dist-info → broccoli_ml-0.4.1.dist-info}/METADATA +1 -1
- {broccoli_ml-0.4.0.dist-info → broccoli_ml-0.4.1.dist-info}/RECORD +5 -5
- {broccoli_ml-0.4.0.dist-info → broccoli_ml-0.4.1.dist-info}/LICENSE +0 -0
- {broccoli_ml-0.4.0.dist-info → broccoli_ml-0.4.1.dist-info}/WHEEL +0 -0
broccoli/vit.py
CHANGED
@@ -66,7 +66,7 @@ class DCTEncoder(nn.Module):
|
|
66
66
|
minimum_cnn_out_channels=16,
|
67
67
|
cnn_kernel_size=3,
|
68
68
|
cnn_kernel_stride=1,
|
69
|
-
|
69
|
+
cnn_padding="same",
|
70
70
|
cnn_kernel_dilation=1,
|
71
71
|
cnn_kernel_groups=1,
|
72
72
|
cnn_activation: nn.Module = ReLU,
|
@@ -75,7 +75,7 @@ class DCTEncoder(nn.Module):
|
|
75
75
|
pooling_type="concat", # maxpool or concat
|
76
76
|
pooling_kernel_size=3,
|
77
77
|
pooling_kernel_stride=2,
|
78
|
-
|
78
|
+
pooling_padding=1,
|
79
79
|
transformer_position_embedding="relative", # absolute or relative
|
80
80
|
transformer_embedding_size=256,
|
81
81
|
transformer_layers=7,
|
@@ -131,7 +131,7 @@ class DCTEncoder(nn.Module):
|
|
131
131
|
input_size,
|
132
132
|
kernel_size=cnn_kernel_size,
|
133
133
|
stride=cnn_kernel_stride,
|
134
|
-
padding=
|
134
|
+
padding=cnn_padding,
|
135
135
|
dilation=cnn_kernel_dilation,
|
136
136
|
)
|
137
137
|
|
@@ -142,7 +142,7 @@ class DCTEncoder(nn.Module):
|
|
142
142
|
cnn_output_size,
|
143
143
|
kernel_size=pooling_kernel_size,
|
144
144
|
stride=pooling_kernel_stride,
|
145
|
-
padding=
|
145
|
+
padding=pooling_padding,
|
146
146
|
dilation=1,
|
147
147
|
)
|
148
148
|
)
|
@@ -174,7 +174,7 @@ class DCTEncoder(nn.Module):
|
|
174
174
|
cnn_out_channels,
|
175
175
|
cnn_kernel_size,
|
176
176
|
stride=cnn_kernel_stride,
|
177
|
-
padding=
|
177
|
+
padding=cnn_padding,
|
178
178
|
dilation=cnn_kernel_dilation,
|
179
179
|
groups=cnn_kernel_groups,
|
180
180
|
bias=True,
|
@@ -212,7 +212,7 @@ class DCTEncoder(nn.Module):
|
|
212
212
|
maxpoolxd(
|
213
213
|
pooling_kernel_size,
|
214
214
|
stride=pooling_kernel_stride,
|
215
|
-
padding=
|
215
|
+
padding=pooling_padding,
|
216
216
|
),
|
217
217
|
Rearrange(
|
218
218
|
f"N C {spatial_dim_names} -> N ({spatial_dim_names}) C"
|
@@ -238,7 +238,7 @@ class DCTEncoder(nn.Module):
|
|
238
238
|
SpaceToDepth(
|
239
239
|
pooling_kernel_size,
|
240
240
|
stride=pooling_kernel_stride,
|
241
|
-
padding=
|
241
|
+
padding=pooling_padding,
|
242
242
|
spatial_dimensions=self.spatial_dimensions,
|
243
243
|
),
|
244
244
|
Rearrange( # for transformer
|
@@ -307,7 +307,7 @@ class DCT(nn.Module):
|
|
307
307
|
minimum_cnn_out_channels=16,
|
308
308
|
cnn_kernel_size=3,
|
309
309
|
cnn_kernel_stride=1,
|
310
|
-
|
310
|
+
cnn_padding="same",
|
311
311
|
cnn_kernel_dilation=1,
|
312
312
|
cnn_kernel_groups=1,
|
313
313
|
cnn_activation: nn.Module = ReLU,
|
@@ -316,7 +316,7 @@ class DCT(nn.Module):
|
|
316
316
|
pooling_type="concat", # maxpool or concat
|
317
317
|
pooling_kernel_size=3,
|
318
318
|
pooling_kernel_stride=2,
|
319
|
-
|
319
|
+
pooling_padding=1,
|
320
320
|
transformer_position_embedding="relative", # absolute or relative
|
321
321
|
transformer_embedding_size=256,
|
322
322
|
transformer_layers=7,
|
@@ -357,7 +357,7 @@ class DCT(nn.Module):
|
|
357
357
|
minimum_cnn_out_channels=minimum_cnn_out_channels,
|
358
358
|
cnn_kernel_size=cnn_kernel_size,
|
359
359
|
cnn_kernel_stride=cnn_kernel_stride,
|
360
|
-
|
360
|
+
cnn_padding=cnn_padding,
|
361
361
|
cnn_kernel_dilation=cnn_kernel_dilation,
|
362
362
|
cnn_kernel_groups=cnn_kernel_groups,
|
363
363
|
cnn_activation=cnn_activation,
|
@@ -366,7 +366,7 @@ class DCT(nn.Module):
|
|
366
366
|
pooling_type=pooling_type,
|
367
367
|
pooling_kernel_size=pooling_kernel_size,
|
368
368
|
pooling_kernel_stride=pooling_kernel_stride,
|
369
|
-
|
369
|
+
pooling_padding=pooling_padding,
|
370
370
|
transformer_position_embedding=transformer_position_embedding,
|
371
371
|
transformer_embedding_size=transformer_embedding_size,
|
372
372
|
transformer_layers=transformer_layers,
|
@@ -10,8 +10,8 @@ broccoli/rope.py,sha256=hw7kBPNR9GQXj4GxyIAffsGKPfcTPOFh8Bc7oEHtaZY,12108
|
|
10
10
|
broccoli/tensor.py,sha256=E2JK5mQwJf75e23-JGcDoT7QxQf89DJReUo2et1LhRY,1716
|
11
11
|
broccoli/transformer.py,sha256=23R58t3TLZMb9ulhCtQ3gXu0mPlfyPvLM8TaGOpaz58,16310
|
12
12
|
broccoli/utils.py,sha256=htq_hOsdhUhL0nJi9WkKiEYOjEoWqFpK5X49PtgTf-0,299
|
13
|
-
broccoli/vit.py,sha256=
|
14
|
-
broccoli_ml-0.4.
|
15
|
-
broccoli_ml-0.4.
|
16
|
-
broccoli_ml-0.4.
|
17
|
-
broccoli_ml-0.4.
|
13
|
+
broccoli/vit.py,sha256=d9nKhohlxpFbu3wzhNi53bYBNMUuShPfF6NXUAyDVA0,13778
|
14
|
+
broccoli_ml-0.4.1.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
|
15
|
+
broccoli_ml-0.4.1.dist-info/METADATA,sha256=qwzzby85q__wYdKBEYBgyW5D7q3GMPoRwzeHPY6Mf6s,1256
|
16
|
+
broccoli_ml-0.4.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
17
|
+
broccoli_ml-0.4.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|