mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-22 13:41:43 +00:00
add the explanation
This commit is contained in:
parent
b032cf9b16
commit
0e9d628bb7
@ -2,6 +2,7 @@ import torch
|
|||||||
from torch import nn
|
from torch import nn
|
||||||
|
|
||||||
|
|
||||||
|
# Same as the SamVisionAttention forward method in the v4.51.3 transformers
|
||||||
def forward_fn():
|
def forward_fn():
|
||||||
def forward(self, hidden_states: torch.Tensor, output_attentions=False) -> torch.Tensor:
|
def forward(self, hidden_states: torch.Tensor, output_attentions=False) -> torch.Tensor:
|
||||||
batch_size, height, width, _ = hidden_states.shape
|
batch_size, height, width, _ = hidden_states.shape
|
||||||
|
Loading…
Reference in New Issue
Block a user