You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Proposed fix for issue keras-team#21519: Reshape layer does not handle -1 shape infor dynamically.
* Removed unused part of the code. The code in the fix should deal exclusively with the case that is not properly handled by ops.reshape. This is when the batch dimension does not have a static shape (shape == None) but all other dimensions have static shape. In that case we can determine the static shape of the dimension containing -1 form all dimensions that are not the batch dimension.
* applied changes according to pre-commit hook
* Added reshape_test test case that fails with original implementation and succeeds with fix.
* Added asserts for expected result.
* Fixed test name and added a further test with custom Model and Conv1D layer.
* applied changes according to pre-commit hook
* Fixed test to use a custom model and not a custom layer as indicated in the test name.
* Implemented suggested changes:
- Use original implementation from build method to avoid repeating the implementation in compute_reshape_output_shape.
- Set the self.built attribute to True in __init__ because no further build is required.
Additional change:
- Mention the optional use of -1 for a single dimension of the target_shape.
* Implemented suggested changes:
- removed explicit call to layer.build from the tests,
- changed the new test to use Model.compile and Model.fit to cover the corresponding API in the tests.
* Remove unused variable.
* Fixed line lengths in doc string.
* Marked test which uses fit method to require a trainable backend.
* Docs:
- Adapted according to review.
- Additionally, replaced "length" with "size" when referring to total number of elements.
* Fixed line length.
0 commit comments