Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Jun 6, 2024
1 parent e179d52 commit 224f5b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/models/Pipeline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ julia> model = Model();
julia> @variable(model, x[1:2]);
julia> f = Omelette.Pipeline([
julia> f = Omelette.Pipeline(
Omelette.LinearRegression([1.0 2.0], [0.0]),
Omelette.ReLUQuadratic(),
])
)
Omelette.Pipeline(Omelette.AbstractPredictor[Omelette.LinearRegression([1.0 2.0], [0.0]), Omelette.ReLUQuadratic()])
julia> y = Omelette.add_predictor(model, f, x)
Expand All @@ -44,6 +44,8 @@ struct Pipeline <: AbstractPredictor
layers::Vector{AbstractPredictor}
end

Pipeline(args::AbstractPredictor...) = Pipeline(collect(args))

function add_predictor(
model::JuMP.Model,
predictor::Pipeline,
Expand Down

0 comments on commit 224f5b3

Please sign in to comment.