Commit 79e83a8d authored by MissPenguin's avatar MissPenguin
Browse files

refine

parent 97a66874
...@@ -45,7 +45,12 @@ class CTCHead(nn.Layer): ...@@ -45,7 +45,12 @@ class CTCHead(nn.Layer):
self.out_channels = out_channels self.out_channels = out_channels
def forward(self, x, targets=None): def forward(self, x, targets=None):
predicts = self.fc(x) if self.mid_channels is None:
predicts = self.fc(x)
else:
predicts = self.fc1(x)
predicts = self.fc2(predicts)
if not self.training: if not self.training:
predicts = F.softmax(predicts, axis=2) predicts = F.softmax(predicts, axis=2)
return predicts return predicts
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment