I came across an implementation of DropConnect layer in TensorLayer: http://tensorlayer.readthedocs.io/en/latest/modules/layers.html but I need a Keras equivalent. Are there any implementations for DropConnect on Keras? If not, can any existing Keras layers be converted to DropConnect?
As of keras 2.0.6 No the is no DropConnect layer. Though it would be better to have one. Here's the link to the documentation https://keras.io/layers/core/ As soon as they have one it will be updated in there. Also no existing layers can be converted to DropConnect. Hope they add in future soon.
Currently there is no official Keras implementation of DropConnect layer, but you can use the implementation from this github: https://github.com/andry9454/KerasDropconnect.
There they explain how to use their code.
The DropConnect classes are in ddrop/layers.py.
So basically they've created the custom Keras Dense-layer (class that extends the Dense layer) and implements "dropping" of weights and also a custom Keras layer-wrapper which you can use.
I've used only the wrapper, I've tried the extended Dense layer but it looks like it has some fixable issues...
I'm not sure if the wrapper works for layers that aren't Dense layers, you can try it...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With