Skip to content

Commit

Permalink
chore: update siglip_vit.py
Browse files Browse the repository at this point in the history
orignal -> original
  • Loading branch information
eltociear authored Oct 18, 2024
1 parent 659982f commit 1a42fa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion janus/models/siglip_vit.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def norm_cdf(x):
def trunc_normal_(tensor, mean=0.0, std=1.0, a=-2.0, b=2.0):
# type: (torch.Tensor, float, float, float, float) -> torch.Tensor
r"""The original timm.models.layers.weight_init.trunc_normal_ can not handle bfloat16 yet, here we first
convert the tensor to float32, apply the trunc_normal_() in float32, and then convert it back to its orignal dtype.
convert the tensor to float32, apply the trunc_normal_() in float32, and then convert it back to its original dtype.
Fills the input Tensor with values drawn from a truncated normal distribution. The values are effectively drawn
from the normal distribution :math:`\mathcal{N}(\text{mean}, \text{std}^2)`
with values outside :math:`[a, b]` redrawn until they are within
Expand Down

0 comments on commit 1a42fa6

Please sign in to comment.