Skip to content

Conversation

doronHarnoy
Copy link

The purpose of this PR is to convert Keras Lambda layers in Keras specific layers when converting global avg pooling operation

We are converting here Lambda layer that expanded dimensions twice (convert shape from [x1,x2,..xn] to [x1,x2,..xn,1,1])
to Keras reshape layer that will keep the same result

@bourcierj
Copy link

bourcierj commented Jul 3, 2022

Hi,
I noted that in with a TensorFlow version > 2.6 we can use keepdims=True in tf.keras.layers.GlobalAveragePooling2D to avoid the need for an extra Reshape layer. FWIW, here is a link to a fix in my fork.

@doronHarnoy
Copy link
Author

Hi, I noted that in with a TensorFlow version > 2.6 we can use keepdims=True in tf.keras.layers.GlobalAveragePooling2D to avoid the need for an extra Reshape layer. FWIW, here is a link to a fix in my fork.

Great man! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants