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

solve image_dim_ordering problem #387

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions keras_layers/keras_layer_AnchorBoxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def call(self, x, mask=None):
wh_list = np.array(wh_list)

# We need the shape of the input tensor
if K.image_dim_ordering() == 'tf':
if K.common.image_dim_ordering() == 'tf':
batch_size, feature_map_height, feature_map_width, feature_map_channels = x._keras_shape
else: # Not yet relevant since TensorFlow is the only supported backend right now, but it can't harm to have this in here for the future
batch_size, feature_map_channels, feature_map_height, feature_map_width = x._keras_shape
Expand Down Expand Up @@ -255,7 +255,7 @@ def call(self, x, mask=None):
return boxes_tensor

def compute_output_shape(self, input_shape):
if K.image_dim_ordering() == 'tf':
if K.common.image_dim_ordering() == 'tf':
batch_size, feature_map_height, feature_map_width, feature_map_channels = input_shape
else: # Not yet relevant since TensorFlow is the only supported backend right now, but it can't harm to have this in here for the future
batch_size, feature_map_channels, feature_map_height, feature_map_width = input_shape
Expand Down