Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using qkeras layers concurrently with Tensorflow's pruning tools. #11

Closed
Duchstf opened this issue Feb 1, 2020 · 7 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@Duchstf
Copy link
Contributor

Duchstf commented Feb 1, 2020

Hello, very cool project!!

I'm just wondering if it would be possible to train the model using qkeras layers with the pruning tools in Tensorflow's model optimization package. For example, can we have something like this?

tf.keras.Sequential([
    sparsity.prune_low_magnitude(
        l.QConv2D(32, 5, padding='same', activation='relu'),
        input_shape=input_shape,
        **pruning_params)])

Thanks,

Duc.

@zhuangh
Copy link
Contributor

zhuangh commented Feb 3, 2020

@Duchstf good point, actually we have been looking into this with the team.

@vloncar
Copy link
Contributor

vloncar commented Feb 5, 2020

@zhuangh Do you have an ETA for this? If you are not working on it, we can look into it, it seems straightforward to implement. I hope I'm not missing something.

@zhuangh
Copy link
Contributor

zhuangh commented Feb 7, 2020

No ETA yet. And for sure, if you have any things in mind, feel free to create PRs. We would be happy to review. thanks!

@zhuangh
Copy link
Contributor

zhuangh commented Feb 10, 2020

Hi @vloncar and @Duchstf

I assigned this to you. Hope it is OK. Feel free to let us know if you have any questions. thanks!

@zhuangh zhuangh added the enhancement New feature or request label Feb 10, 2020
@vloncar
Copy link
Contributor

vloncar commented Feb 11, 2020

Hi @zhuangh, custom prunable layers rely on stuff from tensorflow_model_optimization which is not part of the bare tensorflow installation. Should we implement it as a hard dependency or do we go for the monkeypatched version so that this functionality is avaliable only when tensorflow-model-optimization package is installed?

@zhuangh
Copy link
Contributor

zhuangh commented Feb 11, 2020

we could use tensorflow_model_optimization as dependency when installing qkeras. Let me know if you have any concern.

@zhuangh
Copy link
Contributor

zhuangh commented Feb 27, 2020

Merged and close this issue!

@zhuangh zhuangh closed this as completed Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants