Gabriele commited on
Commit ·
bc0c462
1
Parent(s): 81aef2d
Align image_encoder.py drop_path_rate computation with upstream
Browse files- image_encoder.py +1 -1
image_encoder.py
CHANGED
|
@@ -695,7 +695,7 @@ class VisionTransformer(nn.Module):
|
|
| 695 |
dpr = [drop_path_rate] * depth
|
| 696 |
else:
|
| 697 |
dpr = [
|
| 698 |
-
|
| 699 |
] # stochastic depth decay rule
|
| 700 |
|
| 701 |
if ffn_layer == "mlp":
|
|
|
|
| 695 |
dpr = [drop_path_rate] * depth
|
| 696 |
else:
|
| 697 |
dpr = [
|
| 698 |
+
x.item() for x in torch.linspace(0, drop_path_rate, depth)
|
| 699 |
] # stochastic depth decay rule
|
| 700 |
|
| 701 |
if ffn_layer == "mlp":
|