Skip to content

Conversation

@copybara-service
Copy link

Fixes for Sequential model with multiple inputs.

  • While Sequential works with multiple inputs in most scenarios, build() did not allow building with multiple inputs. This is now fixed.
  • Removed the build_input_shape from the new serialization format. This is a legacy concept, which has been replaced with build_config.input_shape in the new format. Having both could cause models to be built twice.
  • build_from_config now always call build with TensorShapes, not tuples. Not all layers handle tuples correctly.

- While `Sequential` works with multiple inputs in most scenarios, `build()` did not allow building with multiple inputs. This is now fixed.
- Removed the `build_input_shape` from the new serialization format. This is a legacy concept, which has been replaced with `build_config.input_shape` in the new format. Having both could cause models to be built twice.
- `build_from_config` now always call `build` with `TensorShape`s, not tuples. Not all layers handle tuples correctly.

PiperOrigin-RevId: 719002230
@copybara-service copybara-service bot merged commit ad06941 into master Jan 23, 2025
@copybara-service copybara-service bot deleted the test_716010092 branch January 23, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants