Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed May 31, 2017
1 parent f15ccfb commit 2366dbb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion keras_rcnn/backend/tensorflow_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def overlap(x, y):

k = y.shape[0]

overlaps = numpy.zeros((n, k), dtype=numpy.float32)
overlaps = keras.backend.zeros((n, k), dtype=numpy.float32)

for k_index in range(k):
area = ((y[k_index, 2] - y[k_index, 0] + 1) * (y[k_index, 3] - y[k_index, 1] + 1))
Expand Down
2 changes: 1 addition & 1 deletion keras_rcnn/layers/object_detection/_object_proposal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ObjectProposal(keras.engine.topology.Layer):
"""

def __init__(self, proposals, **kwargs):
self.output_dim = (None, None, 4)
self.output_dim = (None, proposals, 4)

self.proposals = proposals

Expand Down
2 changes: 1 addition & 1 deletion tests/layers/object_detection/test_object_proposal.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def test_call(self, object_proposal_model):
assert prediction.shape == (1, 100, 4)

def test_compute_output_shape(self, object_proposal_layer):
assert object_proposal_layer.compute_output_shape((14, 14)) == (None, None, 4)
assert object_proposal_layer.compute_output_shape((14, 14)) == (None, 300, 4)

0 comments on commit 2366dbb

Please sign in to comment.