Skip to content

Commit

Permalink
Update cif_loss.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Mddct authored Mar 12, 2023
1 parent c76e22a commit cc4b37a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions py/cif_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ def forward(self, alpha: torch.Tensor, ctc_log_probs: torch.Tensor,
ctc_blank_probs = ctc_log_probs[:, :, self.blank]
triggerd = ctc_blank_probs < self.spike_threshold
spikes = triggerd * mask
begin = torch.ones(batch_size,
1,
dtype=spikes.dtype,
device=spikes.device)
spikes = torch.cat([begin, spikes[:,1:]], dim=1)
index = torch.arange(alpha.size(1),
device=alpha.device).unsqueeze(0) #[1,L]
boundary_loss_list = []
Expand Down

0 comments on commit cc4b37a

Please sign in to comment.