mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Applies rule C418 and fixes all instances of it. Also updates flake8-comprehension Pull Request resolved: https://github.com/pytorch/pytorch/pull/99178 Approved by: https://github.com/ezyang
19 lines
566 B
Python
19 lines
566 B
Python
__all__ = [
|
|
"get_static_sparse_quantized_mapping",
|
|
"get_dynamic_sparse_quantized_mapping",
|
|
]
|
|
|
|
def get_static_sparse_quantized_mapping():
|
|
import torch.ao.nn.sparse
|
|
_static_sparse_quantized_mapping = {
|
|
torch.nn.Linear: torch.ao.nn.sparse.quantized.Linear,
|
|
}
|
|
return _static_sparse_quantized_mapping
|
|
|
|
def get_dynamic_sparse_quantized_mapping():
|
|
import torch.ao.nn.sparse
|
|
_dynamic_sparse_quantized_mapping = {
|
|
torch.nn.Linear: torch.ao.nn.sparse.quantized.dynamic.Linear,
|
|
}
|
|
return _dynamic_sparse_quantized_mapping
|