Documentation listing supported layers for Keras, Caffe and TensorFlow - #409
Documentation listing supported layers for Keras, Caffe and TensorFlow#409Azamlynny wants to merge 12 commits into
Conversation
|
@Azamlynny That's a very neat documentation, good job! I have a few suggestions before we can approve this:
|
Ram81
left a comment
There was a problem hiding this comment.
@Azamlynny good work, few comments
| ### Custom Layers | ||
| | Caffe | Keras | Tensorflow | | ||
| | :-----------: | :----------: | :---------: | | ||
| | √ | √ | Use Keras API for custom layers | |
There was a problem hiding this comment.
You can add LRN as an example in custom layers supported.
| ## Additional Notes: | ||
| * Keras does not support the LRN layer used in Alexnet & many other models. To use the LRN layer refer to here: https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/keras_custom_layer_usage.md. | ||
| * Documentation for writing your own Keras layers is found here: https://keras.io/layers/writing-your-own-keras-layers/ | ||
| * Caffe 3D layers can be used in Caffe 2.0 |
There was a problem hiding this comment.
We haven't tested any features for caffe 2.0 yet, have you tested this if not we can drop this line.
| * Caffe 3D layers can be used in Caffe 2.0 | ||
|
|
||
| ## Documentation for Caffe, Keras, and Tensorflow layers | ||
| * Documentation for all Keras Layers is found here: https://keras.io/layers/about-keras-layers/ |
There was a problem hiding this comment.
You can add a markdown link on here.
|
|
||
| ## Documentation for Caffe, Keras, and Tensorflow layers | ||
| * Documentation for all Keras Layers is found here: https://keras.io/layers/about-keras-layers/ | ||
| * Documentation for all Caffe Layers is found here: http://caffe.berkeleyvision.org/tutorial/layers.html |
| ## Documentation for Caffe, Keras, and Tensorflow layers | ||
| * Documentation for all Keras Layers is found here: https://keras.io/layers/about-keras-layers/ | ||
| * Documentation for all Caffe Layers is found here: http://caffe.berkeleyvision.org/tutorial/layers.html | ||
| * Documentation for all Tensorflow Layers is found here: https://www.tensorflow.org/api_docs/python/tf/layers |
|
|
||
| ## Additional Notes: | ||
| * Keras does not support the LRN layer used in Alexnet & many other models. To use the LRN layer refer to here: https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/keras_custom_layer_usage.md. | ||
| * Documentation for writing your own Keras layers is found here: https://keras.io/layers/writing-your-own-keras-layers/ |
There was a problem hiding this comment.
You can add a markdown link on here.
| | :-----------: | :----------: | :---------: | | ||
| | √ | √ | Use Keras API for custom layers | | ||
|
|
||
| ## Additional Notes: |
There was a problem hiding this comment.
You can add a markdown link on here.
| @@ -0,0 +1,176 @@ | |||
| # Layers supported in Caffe, Keras, and Tensorflow | |||
| Below is are table showing which layers are supported by Caffe, Keras, and Tensorflow: | |||
| | ZeroPadding 3D | × | √ | √ | | ||
| | Im2Col | √ | × | × | | ||
| | Spatial Pyramid Pooling | √ | × | × | | ||
| * Upsampling in Caffe can be done by using methods shown here: https://gist.github.com/tnarihi/54744612d35776f53278 |
| ### Custom Layers | ||
| | Layer | Caffe | Keras | Tensorflow | | ||
| | :-----------: | :----------: | :---------: | :---------: | | ||
| | Custom Layers | √ | √ | Use Keras API for custom layers | |
There was a problem hiding this comment.
No need to mention custom layers explicitly
|
@Azamlynny minor changes |
|
Also, could you please specify how you've tested the layers and the procedure used. We will need to cross verify it once on our end as well before approving the PR. A code template would be helpful as well . |
|
@Azamlynny Please add a section for |
thatbrguy
left a comment
There was a problem hiding this comment.
Hey, impressive work so far. Made some minor changes.
| | Data | √ | √ | √ | √ | √ | √ | | ||
| | HDF5 Data | √ | √ | √ | √ | √ | √ | | ||
| | HDF5 Output Data | √ | √ | √ | √ | √ | √ | | ||
| | Input | √ | √ | √ | √ | √ | √ | |
There was a problem hiding this comment.
If i remember correctly, for Keras and Tensorflow (in Fabrik) only Input is available. All other data layers are not available.
| | Log | √ | √ | × | √ | × | × | | ||
| | BNLL | √ | × | × | √ | × | × | | ||
| | Bias | √ | × | × | √ | √ | √ | | ||
| | Scale | √ | × | × | √ | √ | √ | |
There was a problem hiding this comment.
I think Scale is Caffe only (in Fabrik)
| | Eltwise | √ | × | × | √ | √ | √ | | ||
| | Parameter | √ | × | × | √ | × | √ | | ||
| | Reduction | √ | × | × | √ | × | × | | ||
| | Silence | √ | × | × | × | × | × | |
There was a problem hiding this comment.
Fabrik Caffe does has silence.
| ### Loss Layers | ||
| | Layer | Caffe | Keras | Tensorflow | Fabrik Caffe | Fabrik Keras | Fabrik Tensorflow | | ||
| | :-----------------------: | :-----------: | :----------: | :---------: | :-----------: | :--------------: | :-----------------: | | ||
| | Multinomial Logistic Loss | √ | × | × | × | × | × | |
There was a problem hiding this comment.
Fabrik caffe has this layer
| | Multinomial Logistic Loss | √ | × | × | × | × | × | | ||
| | Infogain Loss | √ | × | × | √ | × | × | | ||
| | Softmax with Loss | √ | × | √ | √ | × | × | | ||
| | Sum-of-Squares/Euclidean | √ | × | × | × | × | × | |
There was a problem hiding this comment.
Fabrik caffe has this layer
| | Softmax with Loss | √ | × | √ | √ | × | × | | ||
| | Sum-of-Squares/Euclidean | √ | × | × | × | × | × | | ||
| | Hinge / Margin | √ | √ | √ | √ | × | × | | ||
| | Sigmoid Cross-Entropy Loss| √ | × | √ | × | × | × | |
There was a problem hiding this comment.
Fabrik caffe has this layer
|
@Azamlynny Excellent work so far! That's a very neat documentation. I've posted a review with some changes. @yashdusing Can you just verify if I have not missed something? |
|
Hello @Azamlynny . Pretty good work so far. Few changes though (I've attached a screenshot completing the core layers) :
(EDIT:
|
|
@Ram81 @thatbrguy Please look into the format of the screenshot I posted and see if I missed something out or any changes are needed. |
|
@yashdusing I think we'll just mention the different names across platforms in brackets. (Inner-Product vs Dense). Let's not mention keras in the TensorFlow section for now. We'll have a separate task to deal with supported tensorflow APIs. @Azamlynny Also, looks like inner-product is crossed out for Caffe. It's available on caffe so please modify that |
I am not sure by what you mean by mention the different names across platforms in brackets. Where would you want this? In the Layer column, or in the actual Caffe and Keras columns and if in these locations what would the layer column be called? |
Not complete
|
@Azamlynny Actually the table looks neater with just ticks. So, if you notice any layer available in Caffe as well as Keras or Tensorflow, with just different names (but mapped to the same Fabrik layer name) you can add it to the notes section after the table |
| ### Locally-connected Layers | ||
| | Layer | Caffe | Keras | Tensorflow | Fabrik Caffe | Fabrik Keras | Fabrik Tensorflow | | ||
| | :-----------------------: | :-----------: | :----------: | :---------: | :-----------: | :--------------: | :-----------------: | | ||
| | LocallyConnected1D | × | √ | √ | × | √ | √× | |
There was a problem hiding this comment.
Why are there both √× in the Fabrik Tensorflow section?
| | Stochastic Pooling | √ | × | × | √ | × | × | | ||
|
|
||
| ### Data Layers | ||
| | Layer | Caffe | Keras | Tensorflow | Fabrik Caffe | Fabrik Keras | Fabrik Tensorflow | |
There was a problem hiding this comment.
Can you also tell me why we have 6 columns two for each layer?
I think only mentioning which layers for a framework does Fabrik support is good enough.


No description provided.