Skip to content

Commit

Permalink
fix zoedepth initialization error under deepspeed zero3 (#35011)
Browse files Browse the repository at this point in the history
fix zoe bug in deepspeed zero3
  • Loading branch information
Tavish9 authored Dec 20, 2024
1 parent c3a4359 commit 4567ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/models/zoedepth/modeling_zoedepth.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def __init__(self, n_classes=256, act=torch.softmax):
self.k = n_classes
self.act = act
self.register_buffer("k_idx", torch.arange(0, n_classes).view(1, -1, 1, 1), persistent=False)
self.register_buffer("k_minus_1", torch.Tensor([self.k - 1]).view(1, -1, 1, 1), persistent=False)
self.register_buffer("k_minus_1", torch.tensor([self.k - 1]).view(1, -1, 1, 1), persistent=False)

def forward(self, probabilities, temperature=1.0, eps=1e-4):
"""Compute the log binomial distribution for probabilities.
Expand Down

0 comments on commit 4567ee8

Please sign in to comment.