Lambda layers in the keras model
See original GitHub issueContinued test from issue #41, it seems like the exported keras model has lambda op. Is it correct?
output of print (k_model.summary()) in #41
Layer (type) Output Shape Param #
=================================================================
input0 (InputLayer) (None, 3, 224, 224) 0
_________________________________________________________________
lambda_1 (Lambda) (None, 3, 232, 232) 0 <-- lambda layer
_________________________________________________________________
conv1.conv2d0.19608361958321 (None, 32, 224, 224) 7808
_________________________________________________________________
in10.5890283736035935 (Lambd (None, 32, 224, 224) 0 <-- lambda layer
_________________________________________________________________
relu0.8399978862622054 (Acti (None, 32, 224, 224) 0
=================================================================
Total params: 7,808
Trainable params: 7,808
Non-trainable params: 0
Trying to make the generated keras model file to tfjs (which does not support lambda layer). Knowing that lambda can be any python codes. This would make it not portable to non-python frameworks, such as c++ or js based ones.
Don’t know if it’s logical to ask, but is it possible to workaround this requirements for lambda layer?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Working With The Lambda Layer in Keras | Paperspace Blog
In this tutorial we'll cover how to use the Lambda layer in Keras to build, save, and load models which perform custom operations...
Read more >Lambda Layers in tf.keras - Medium
Lambda layer is an easy way to customize a layer to do simple arithmetic. Let say you want to add your own activation...
Read more >Keras - Lambda Layers - Tutorialspoint
Keras - Lambda Layers, Lambda is used to transform the input data using an expression or function. For example, if Lambda with expression...
Read more >Lambda layers for custom models - Towards Data Science
The Lambda layer exists so that arbitrary expressions can be used as a Layer when constructing Sequential and Functional API models. Lambda ...
Read more >How to Use Lambda Layer in a Neural Network?
the lambda layer is a layer for neural network that helps in the data transformation between the other layers of a neural network....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I afraid it’s tensorflow issue: MirrorPad.
@nerox8664 Thanks for the finding. I guess the file format does not reflect what’s at the top level. Should’ve realized that earlier.
Next logical step, I guess, is to see what can be tweaked at the graph to avoid
MirrorPad.