Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making a Keras layer dynamic for Tensorflow operations(Tensorflow object detection API) #109

Open
rohith513 opened this issue Apr 2, 2019 · 1 comment

Comments

@rohith513
Copy link

rohith513 commented Apr 2, 2019

Hello,
I am replacing a Convolution layer with a Locally connected layer in ResNet (with Faster RCNN). Tensorflow imports this layer from keras and and it says that the dimensions of the input to this layer should be fully defined. When I run it it throws the below error.

So how to make this keras layer dynamic?

Source code / logs
Bottleneck block from Resnet (resnet_v1.py):

residual = slim.conv2d(inputs, depth_bottleneck, [1, 1], stride=1, scope='conv1')
residual = Local_connection.LocallyConnected2D(filters=depth_bottleneck, kernel_size=3, strides = (2,2),
data_format='channels_last')(residual)
residual = slim.conv2d(residual, depth, [1, 1], stride=1,activation_fn=None, scope='conv3')

Error:
ValueError: The spatial dimensions of the inputs to a LocallyConnected2D layer should be fully-defined, but layer received the inputs shape (1, None, None, 256)

Link to the keras layer (check line 309):
https://github.com/tensorflow/models/issues/url

@rohith513
Copy link
Author

@fchollet

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

No branches or pull requests

1 participant