-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem?
The current implementation is built on keras_model_sequential()
, which limits users to a linear stack of layers. This prevents the creation of modern, complex architectures with non-linear topologies like residual connections (ResNets), multiple inputs/outputs, or shared layers (Inception-like models).
Describe the solution you'd like
A new model specification factory, create_keras_functional_spec()
, that allows users to define a model as a directed acyclic graph.
Instead of a simple ordered list, the layer_blocks
argument would allow each block to specify which preceding block(s) it takes as input via an input_from
argument.
Hypothetical Syntax:
create_keras_functional_spec(
model_name = "resnet_like",
layer_blocks = list(
input = input_block(),
path_a = dense_block(input_from = "input"),
path_b = conv_block(input_from = "input"),
concat = layer_concatenate(input_from = c("path_a", "path_b")),
output = output_block(input_from = "concat")
),
mode = "regression"
)
Acceptance Criteria
- A new factory function
create_keras_functional_spec()
is created. - The internal fitting engine (
generic_keras_fit_impl
or a new variant) is updated to parse theinput_from
dependencies and construct the Keras functional model graph correctly. - The new factory supports architectural tuning (e.g.,
num_{block_name}
). - The function is documented with a clear example of a multi-path model.
- Unit tests are added to verify that a simple functional model can be created, fit, and tuned.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request