mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/48038 nn.ReLU works for both float and quantized input, we don't want to define an nn.quantized.ReLU that does the same thing as nn.ReLU, similarly for nn.quantized.functional.relu this also removes the numerical inconsistency for models quantizes nn.ReLU independently in qat mode Test Plan: Imported from OSS Imported from OSS Reviewed By: vkuzo Differential Revision: D25000462 fbshipit-source-id: e3609a3ae4a3476a42f61276619033054194a0d2
115 lines
1.8 KiB
ReStructuredText
115 lines
1.8 KiB
ReStructuredText
torch.nn.quantized
|
|
------------------
|
|
|
|
This module implements the quantized versions of the nn modules and functionals.
|
|
|
|
Functional interface
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
.. automodule:: torch.nn.quantized.functional
|
|
|
|
.. autofunction:: linear
|
|
.. autofunction:: conv1d
|
|
.. autofunction:: conv2d
|
|
.. autofunction:: conv3d
|
|
.. autofunction:: max_pool2d
|
|
.. autofunction:: adaptive_avg_pool2d
|
|
.. autofunction:: avg_pool2d
|
|
.. autofunction:: interpolate
|
|
.. autofunction:: hardswish
|
|
.. autofunction:: upsample
|
|
.. autofunction:: upsample_bilinear
|
|
.. autofunction:: upsample_nearest
|
|
|
|
|
|
.. automodule:: torch.nn.quantized
|
|
|
|
ReLU6
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: ReLU6
|
|
:members:
|
|
|
|
ELU
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: ELU
|
|
:members:
|
|
|
|
Hardswish
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: Hardswish
|
|
:members:
|
|
|
|
Conv1d
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: Conv1d
|
|
:members:
|
|
|
|
Conv2d
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: Conv2d
|
|
:members:
|
|
|
|
Conv3d
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: Conv3d
|
|
:members:
|
|
|
|
FloatFunctional
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: FloatFunctional
|
|
:members:
|
|
|
|
QFunctional
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: QFunctional
|
|
:members:
|
|
|
|
Quantize
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: Quantize
|
|
:members:
|
|
|
|
DeQuantize
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: DeQuantize
|
|
:members:
|
|
|
|
Linear
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: Linear
|
|
:members:
|
|
|
|
BatchNorm2d
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: BatchNorm2d
|
|
:members:
|
|
|
|
BatchNorm3d
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: BatchNorm3d
|
|
:members:
|
|
|
|
LayerNorm
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: LayerNorm
|
|
:members:
|
|
|
|
GroupNorm
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: GroupNorm
|
|
:members:
|
|
|
|
InstanceNorm1d
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: InstanceNorm1d
|
|
:members:
|
|
|
|
InstanceNorm2d
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: InstanceNorm2d
|
|
:members:
|
|
|
|
InstanceNorm3d
|
|
~~~~~~~~~~~~~~~
|
|
.. autoclass:: InstanceNorm3d
|
|
:members:
|