Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 15, 2022
1 parent 37eb2cc commit 2e124fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nemo/utils/export_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class ExportFormat(Enum):
".onnx": ExportFormat.ONNX,
}


def cast_tensor(x, from_dtype=torch.float16, to_dtype=torch.float32):
return x.to(dtype=to_dtype) if x.dtype == from_dtype else x

Expand Down Expand Up @@ -74,6 +75,7 @@ def forward(self, x):
ret = self.mod.forward(x)
return ret


class LinearWithBiasSkip(nn.Module):
def __init__(self, weight, bias, skip_bias_add):
super(LinearWithBiasSkip, self).__init__()
Expand Down
2 changes: 1 addition & 1 deletion tools/speech_data_processor/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
diff_match_patch
diff_match_patch

0 comments on commit 2e124fd

Please sign in to comment.