Skip to content

Commit

Permalink
Update train.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored May 16, 2024
1 parent 97a490f commit d8f1ad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/train.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function train!(loss, model_and_shadow::Enzyme.Duplicated, data, opt_state)
throw(DomainError(lazy"Loss is $l on data item $i, stopping training"))
end
opt_state, model = Optimisers.update!(opt_state, model_and_shadow.val, model_and_shadow.dval)
model_and_shadow = Duplicated(model, model_and_shadow.dval)
model_and_shadow = Enzyme.Duplicated(model, model_and_shadow.dval)
@logprogress Base.haslength(data) ? i/length(data) : nothing
end
end
Expand Down

0 comments on commit d8f1ad8

Please sign in to comment.