TF2.0 the fate of `contrib.quantize` project

837 views
Skip to first unread message

Sergey Mironov

unread,
Sep 23, 2019, 10:17:21 AM9/23/19
to TensorFlow Developers
Hi, all! I'd like to ask about plans for contrib.quantize project in TensorFlow 2.0.

From StackOverflow I found the follwowing link


saying that the owner of `contrib.quantize` is Suharshs, but no fate is specified.

Currently I got an unrelated error on attempt to import anything from `tensorflow.contrib`. Could anybody provide me with some information?

Thanks in advance,
Sergey

PS
I'm using TF 2.0.0-rc1.

Paige Bailey

unread,
Sep 23, 2019, 10:55:41 AM9/23/19
to Sergey Mironov, Suharsh Sivakumar, Raziel Alvarez, TensorFlow Developers
Adding +Suharsh Sivakumar and +Raziel Alvarez, RE: quantization.

--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/218390d0-50c4-4e31-9808-39540f965675%40tensorflow.org.


--

Paige Bailey   

Product Manager (TensorFlow)

@DynamicWebPaige

webp...@google.com


 

Sergey Mironov

unread,
Sep 23, 2019, 11:42:30 AM9/23/19
to TensorFlow Developers, grr...@gmail.com, suha...@google.com, raz...@google.com
Thanks for adding people.

Update: I found some quantization code in the `core` codebase and tried to re-produce some tests, but

1. I see the following deprecation warning

```
WARNING:tensorflow:From /workspace/mironov/hbtest/fq_transformer_bug.py:40: do_quantize_training_on_graphdef (from tensorflow.python.pywrap_tensorflow_internal) is deprecated and will be removed in a future version.                        
Instructions for updating:
GraphDef quantized training rewriter is deprecated in the long term
```

2. Test `testQuantizeTraining` doesn't seem to work for me (the last assert is triggered, I conculde that `do_quantize_training_on_graphdef` didn't modify the graph in any way)

I'm interested in fake-quantization, either automatic (via graph rewrite) or manual (as separate operations). Could you please share the plans and views you have regarding this subject? 

Thanks in advance,
Sergey Mironov

понедельник, 23 сентября 2019 г., 17:55:41 UTC+3 пользователь Paige Bailey написал:
Adding +Suharsh Sivakumar and +Raziel Alvarez, RE: quantization.

On Mon, Sep 23, 2019 at 7:17 AM Sergey Mironov <grr...@gmail.com> wrote:
Hi, all! I'd like to ask about plans for contrib.quantize project in TensorFlow 2.0.

From StackOverflow I found the follwowing link


saying that the owner of `contrib.quantize` is Suharshs, but no fate is specified.

Currently I got an unrelated error on attempt to import anything from `tensorflow.contrib`. Could anybody provide me with some information?

Thanks in advance,
Sergey

PS
I'm using TF 2.0.0-rc1.

--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devel...@tensorflow.org.

Piyush Datta

unread,
Sep 23, 2019, 12:07:59 PM9/23/19
to Sergey Mironov, TensorFlow Developers, raz...@google.com, suha...@google.com
Hi Sergey,

I’m not sure about the fate of contrib.quantize, however the contrib folder was removed on September 18. 

That’s why you aren’t able to import anything. This is for master and 2.X branches. 1.X branches still have contrib folder.

I’ve forwarded you the email regarding the removal of the folder.

Best Regards,
Piyush Datta

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/6234c60e-3994-4894-954d-1e397ff6ebd4%40tensorflow.org.
--
Best Regards,
Piyush Datta

王振华

unread,
Sep 24, 2019, 2:08:43 AM9/24/19
to TensorFlow Developers, grr...@gmail.com, raz...@google.com, suha...@google.com
Hi guys,


Hoping this helpful :)

Cheers
Zhenhua

在 2019年9月24日星期二 UTC+8上午12:07:59,Piyush Datta写道:

Sergey Mironov

unread,
Sep 24, 2019, 6:45:38 AM9/24/19
to TensorFlow Developers, grr...@gmail.com, raz...@google.com, suha...@google.com
Zhenhua, Piyush, thanks for the information.

I'm looking forward to trying new Keras implementation. Of all kinds of quantization, I am more interested in quantization-aware training since we look at less-than-8 bits designs. If you need some help or interested in early testing of Keras implementation - please let me know. Post-training quantization is probably out of my scope right now.

Model Optimization Toolkit is fine, I see quntization things in it's roadmap and I'd like to know how does it relate to the Keras approach. If I understand the intentions correctly, model-optimization toolkit is designed to be a kind of automatic tool while Keras usually provides more fine-grained functional-style API. Please correct me if there is a better explanation.

Regards,
Sergey Mironov

вторник, 24 сентября 2019 г., 9:08:43 UTC+3 пользователь 王振华 написал:

Suharsh Sivakumar

unread,
Sep 24, 2019, 2:14:40 PM9/24/19
to Sergey Mironov, TensorFlow Developers, Raziel Alvarez
Hi Sergey,

The Keras based API will be released as part of the model optimization toolkit. Will keep you posted!

-Suharsh

Sergey Mironov

unread,
Sep 24, 2019, 2:34:29 PM9/24/19
to Raziel Alvarez, TensorFlow Developers, Suharsh Sivakumar
> It's the same.

Silly me :) OK, thanks again!

вт, 24 сент. 2019 г. в 21:13, Raziel Alvarez <raz...@google.com>:
"Model Optimization Toolkit is fine, I see quntization things in it's roadmap and I'd like to know how does it relate to the Keras approach."

It's the same.

As soon as it's ready there will be a blog post in the TensorFlow blog, and twitter and other TF user groups.

Thanks

Reply all
Reply to author
Forward
0 new messages