Skip to content

Commit

Permalink
Merge #312
Browse files Browse the repository at this point in the history
312: Removing unused `history` field in DataMisfitController r=eviatarbach a=eviatarbach

The `history` field in DataMisfitController no longer does anything. It should be removed.

Co-authored-by: Eviatar Bach <[email protected]>
  • Loading branch information
bors[bot] and eviatarbach committed Jul 11, 2023
2 parents b544c56 + b2a979f commit b349ff3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/LearningRateSchedulers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ $(TYPEDFIELDS)
struct DataMisfitController{FT, M, S} <:
LearningRateScheduler where {FT <: AbstractFloat, M <: AbstractMatrix, S <: AbstractString}
iteration::Vector{Int}
history::Vector{FT}
inv_sqrt_noise::Vector{M}
terminate_at::FT
on_terminate::S
Expand All @@ -114,7 +113,6 @@ function DataMisfitController(; terminate_at = 1.0, on_terminate = "stop")
FT = Float64
M = Matrix{FT}
iteration = Int[]
history = FT[]
inv_sqrt_noise = M[]

if terminate_at > 0 #can be infinity
Expand All @@ -131,7 +129,7 @@ function DataMisfitController(; terminate_at = 1.0, on_terminate = "stop")
)
end

return DataMisfitController{FT, M, typeof(on_terminate)}(iteration, history, inv_sqrt_noise, ta, on_terminate)
return DataMisfitController{FT, M, typeof(on_terminate)}(iteration, inv_sqrt_noise, ta, on_terminate)
end

"""
Expand Down

0 comments on commit b349ff3

Please sign in to comment.