Upd version 0.3.0
Compare changes
Files
3+ 24
− 24
@@ -31,7 +31,7 @@ void init_PTQ(py::module &m) {
@@ -31,7 +31,7 @@ void init_PTQ(py::module &m) {
@@ -40,15 +40,15 @@ void init_PTQ(py::module &m) {
@@ -40,15 +40,15 @@ void init_PTQ(py::module &m) {
@@ -69,17 +69,17 @@ void init_PTQ(py::module &m) {
@@ -69,17 +69,17 @@ void init_PTQ(py::module &m) {
This is done by reconfiguring the scaling nodes, as well as rescaling the weights and biases tensors.
m.def("quantize_normalized_network", &quantizeNormalizedNetwork, py::arg("network"), py::arg("nb_bits"), py::arg("no_quant")=false, py::arg("optimize_signs"), py::arg("verbose") = false,
@@ -94,13 +94,13 @@ void init_PTQ(py::module &m) {
@@ -94,13 +94,13 @@ void init_PTQ(py::module &m) {
m.def("quantize_network", &quantizeNetwork ,py::arg("network"), py::arg("nb_bits"), py::arg("input_dataset"), py::arg("clipping_mode") = Clipping::MAX , py::arg("no_quantization") = true, py::arg("optimize_signs") = false, py::arg("single_shift") = false, py::arg("use_cuda") = false, py::arg("verbose") = false,
m.def("quantize_network", &quantizeNetwork ,py::arg("network"), py::arg("nb_bits"), py::arg("input_dataset"), py::arg("clipping_mode") = Clipping::MAX , py::arg("no_quantization") = true, py::arg("optimize_signs") = false, py::arg("single_shift") = false, py::arg("use_cuda") = false, py::arg("verbose") = false,
@@ -108,7 +108,7 @@ void init_PTQ(py::module &m) {
@@ -108,7 +108,7 @@ void init_PTQ(py::module &m) {
:param single_shift: Whether to convert the scaling factors into powers of two. If true the approximations are compensated using the previous nodes weights.
@@ -155,9 +155,9 @@ void init_PTQ(py::module &m) {
@@ -155,9 +155,9 @@ void init_PTQ(py::module &m) {
m.def("adjust_ranges", &adjustRanges, py::arg("clipping_mode"), py::arg("value_ranges"), py::arg("nb_bits"), py::arg("network"), py::arg("input_dataset"), py::arg("use_cuda"), py::arg("verbose") = false,
To do so compute the optimal clipping values for every node and multiply the input ranges by those values.
@@ -177,28 +177,28 @@ void init_PTQ(py::module &m) {
@@ -177,28 +177,28 @@ void init_PTQ(py::module &m) {
The goal of the routine is to maximize the number of unsigned IOs in order to double the value resolution when possible.
:return: A map associating a pair of signs to each node of the GraphView (a sign for the input and one for the output).
m.def("cross_layer_equalization", &crossLayerEqualization, py::arg("network"), py::arg("target_delta"),
@@ -206,18 +206,18 @@ void init_PTQ(py::module &m) {
@@ -206,18 +206,18 @@ void init_PTQ(py::module &m) {