ARM-software / sesr

Super-Efficient Super Resolution
Apache License 2.0
89 stars 15 forks source link

Why is there no bias in collapsed wt_tensor? #14

Open s1ddok opened 2 years ago

s1ddok commented 2 years ago

Hello! Thanks for your incredible work.

I'm closely following your code and I see one weird thing. So you initialize your Conv2D using tf.keras.layers.Conv2D which according to docs has trainable bias by default. But then when you collapse the block you call the conv2d func without bias and you don't even calculate it:

out = tf.nn.conv2d(inputs, wt_tensor, strides=[1, 1, 1, 1], padding="SAME")

can you explain is it a bug or bias gets cancelled somehow during collapsing?

s1ddok commented 2 years ago

@kbhardwa, could you weigh in on this?

mayujie commented 2 years ago

Hello ! I have a similar question as above? Could you explain it? :)

prathapsoma commented 1 year ago

Can you suggest me after training how to test the model.

zhihongp commented 1 year ago

Have the same question. How is the bias handled in collapsing?