haskell icon indicating copy to clipboard operation
haskell copied to clipboard

implement `numOutputs` for `biasAdd`

Open silky opened this issue 8 years ago • 3 comments

this function fails with:

numOuputs not implemented for "BiasAdd"

when you try and use it anywhere, such as

...
conv `TFC.biasAdd` (TF.readValue convBias)

silky avatar Jun 05 '17 05:06 silky

I need to improve that error message. It just means that the gradients aren't implemented for BiasAdd. There need to be implementations for both numOutputs and opGrad.

fkm3 avatar Jun 05 '17 07:06 fkm3

ah yes, of course

silky avatar Jun 05 '17 07:06 silky

If you want biasAdd because of conv2d with NCHW format, then, coincidentally, I'm doing something similar, and I think you can work around the lack of biasAdd by using normal add and putting some 1's on the end of your bias shape, e.g. [numChannels, 1, 1].

fkm3 avatar Jun 05 '17 07:06 fkm3