Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Keras ZeroPad2D layer #3

Open
lhfowl opened this issue Apr 26, 2019 · 1 comment
Open

Keras ZeroPad2D layer #3

lhfowl opened this issue Apr 26, 2019 · 1 comment

Comments

@lhfowl
Copy link

lhfowl commented Apr 26, 2019

Hello,

I'm trying to certify a model I have trained in pytorch, and then converted to keras. I am using run_cnn in pymain.py, but I'm getting the error:

"ValueError: Invalid Layer Type"

because of the layer:

"tensorflow.python.keras.layers.convolutional.ZeroPadding2D"

Is this layer not currently supported in your code? Do you have any suggestions on how to modify the code to get past this?

@AkhilanB
Copy link
Contributor

AkhilanB commented Apr 26, 2019

Yes, the code does not currently support ZeroPadding2D layers. I suggest modifying either the 'Model' or 'CNNModel' classes in cnn_bounds_full.py or cnn_bounds_full_core.py respectively. One way to to this might be to modify the '__init__' function so that when a padding layer is encountered, it modifies 'self.pads' for the next layer. This way, I think the rest of the code can be used as is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants