mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
remove debug print
This commit is contained in:
@@ -3756,8 +3756,6 @@ def pool_workaround(
|
|||||||
# find index for EOS token
|
# find index for EOS token
|
||||||
eos_token_index = torch.where(input_ids == eos_token_id)[1]
|
eos_token_index = torch.where(input_ids == eos_token_id)[1]
|
||||||
eos_token_index = eos_token_index.to(device=last_hidden_state.device)
|
eos_token_index = eos_token_index.to(device=last_hidden_state.device)
|
||||||
print(eos_token_index)
|
|
||||||
print(input_ids.to(dtype=torch.int, device=last_hidden_state.device).argmax(dim=-1))
|
|
||||||
|
|
||||||
# get hidden states for EOS token
|
# get hidden states for EOS token
|
||||||
pooled_output = last_hidden_state[torch.arange(last_hidden_state.shape[0], device=last_hidden_state.device), eos_token_index]
|
pooled_output = last_hidden_state[torch.arange(last_hidden_state.shape[0], device=last_hidden_state.device), eos_token_index]
|
||||||
|
|||||||
Reference in New Issue
Block a user