# Bias inside keras layer

**URL:** <https://discuss.pennylane.ai/t/bias-inside-keras-layer/438>\
**Category:** PennyLane Feedback\
**Created:** [June 21, 2020, 2:31pm UTC](https://discuss.pennylane.ai/t/bias-inside-keras-layer/438 "2020-06-21T14:31:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kareem\_essafty](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/kareem_essafty/32/401_2.png) [@kareem\_essafty](https://discuss.pennylane.ai/u/kareem_essafty)\
**Post date:** [June 21, 2020, 2:31pm UTC](https://discuss.pennylane.ai/t/bias-inside-keras-layer/438/1 "2020-06-21T14:31:44Z")

</div>

hi,  
It’s a small suggestion but it was very helpful in my case. you can modify the Keras layer to accept a variable called “include\_bias=False” and based on that the build function can initialize some bias weights and also in the call function we can add the result from the anode to the bias.

I [forked](https://github.com/kareem1925/pennylane/blob/04bb5ba0fcced558e1273b94b3ea8c39622c5ca4/pennylane/qnn/keras.py#L191) the repo and modified it and it worked to replicate the circuit centric classifier paper

---

<div class="post-metadata">

**Author:** ![Tom\_Bromley](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/tom_bromley/32/129_2.png) [@Tom\_Bromley](https://discuss.pennylane.ai/u/Tom_Bromley)\
**Post date:** [June 22, 2020, 2:39pm UTC](https://discuss.pennylane.ai/t/bias-inside-keras-layer/438/2 "2020-06-22T14:39:06Z")

</div>

Hi @kareem_essafty, thanks for the suggestion!

This is something we can bear in mind going forward, especially if there is demand from users.
