Skip to content

Commit ae957fe

Browse files
Apply suggestions from code review
Co-authored-by: Kyle Daruwalla <daruwalla.k.public@icloud.com>
1 parent fa5c563 commit ae957fe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/models/tabularmodel.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ function TabularModel(
4040

4141
n_emb = sum(size(embedlayer.weight)[1] for embedlayer in embedslist)
4242
sizes = append!(zeros(0), [n_emb+n_cont], layers)
43-
actns = append!([], [act_cls for i in 1:(length(sizes)-1)])
4443

4544
_layers = []
4645
for (i, (p, a)) in enumerate(zip(Iterators.cycle(ps), actns))
47-
layer = linbndrop(Int64(sizes[i]), Int64(sizes[i+1]), use_bn=use_bn, p=p, act=a, lin_first=lin_first)
46+
layer = linbndrop(Int64(sizes[i]), Int64(sizes[i+1]), use_bn=use_bn, p=p, act=act_cls, lin_first=lin_first)
4847
push!(_layers, layer)
4948
end
5049
push!(_layers, linbndrop(Int64(last(sizes)), Int64(out_sz), use_bn=bn_final, lin_first=lin_first))
5150
layers = isnothing(y_range) ? Chain(Parallel(vcat, embeds, bn_cont), _layers...) : Chain(Parallel(vcat, embeds, bn_cont), _layers..., @. x->Flux.sigmoid(x) * (y_range[2] - y_range[1]) + y_range[1])
5251
layers
53-
end
52+
end

0 commit comments

Comments
 (0)