@@ -55,7 +55,15 @@ FluxModelsDistribution( inDim::NTuple{ID,Int},
55
55
serializeHollow:: Bool = false ) where {ID,OD,P,D<: AbstractArray } = FluxModelsDistribution {ID,OD,P,D} (inDim, outDim, models, data, Ref (shuffle), Ref (serializeHollow) )
56
56
#
57
57
58
- # @deprecate
58
+ FluxModelsDistribution ( models:: Vector{P} ,
59
+ inDim:: NTuple{ID,Int} ,
60
+ data:: D ,
61
+ outDim:: NTuple{OD,Int} ;
62
+ shuffle:: Bool = true ,
63
+ serializeHollow:: Bool = false ) where {ID,OD,P,D<: AbstractArray } = FluxModelsDistribution {ID,OD,P,D} (inDim, outDim, models, data, Ref (shuffle), Ref (serializeHollow) )
64
+ #
65
+
66
+
59
67
60
68
61
69
@@ -110,13 +118,19 @@ function MixtureFluxModels( F_::FunctorInferenceType,
110
118
otherComp:: _IIFListTypes ,
111
119
diversity:: Union{<:AbstractVector, <:NTuple, <:DiscreteNonParametric} ;
112
120
shuffle:: Bool = true ,
113
- serializeHollow:: Bool = false ) where {P,ID,D,OD}
121
+ serializeHollow:: Bool = false ) where {P,ID,D<: AbstractArray ,OD}
114
122
#
115
123
# must preserve order
116
124
allComp = OrderedDict {Symbol, Any} ()
117
125
118
126
# always add the Flux model first
119
- allComp[:fluxnn ] = FluxModelsDistribution (inDim,outDim,nnModels,data,shuffle,serializeHollow)
127
+ allComp[:fluxnn ] = FluxModelsDistribution (nnModels,
128
+ inDim,
129
+ data,
130
+ outDim,
131
+ shuffle= shuffle,
132
+ serializeHollow= serializeHollow)
133
+ #
120
134
isNT = otherComp isa NamedTuple
121
135
for idx in 1 : length (otherComp)
122
136
nm = isNT ? keys (otherComp)[idx] : Symbol (" c$(idx+ 1 ) " )
@@ -129,7 +143,9 @@ function MixtureFluxModels( F_::FunctorInferenceType,
129
143
return Mixture (F_, ntup, diversity)
130
144
end
131
145
132
- MixtureFluxModels (:: Type{F} , w... ;kw... ) where F <: FunctorInferenceType = MixtureFluxModels (F (LinearAlgebra. I), w... ;kw... )
146
+ MixtureFluxModels (:: Type{F} ,
147
+ w... ;
148
+ kw... ) where F <: FunctorInferenceType = MixtureFluxModels (F (LinearAlgebra. I),w... ;kw... )
133
149
134
150
135
151
0 commit comments