Skip to content

Commit

Permalink
fixup! discojs-core/models: add gpt
Browse files Browse the repository at this point in the history
  • Loading branch information
tharvik committed Mar 15, 2024
1 parent 1762b10 commit 708d4e7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions discojs/discojs-core/src/informant/training_informant/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,15 @@ export abstract class Base {
return this.validationGraphInformant.accuracy()
}

/** add loss for current round */
// eslint-disable-next-line accessor-pairs
set loss (loss: number) {
set loss (loss: number | undefined) {
if (loss === undefined) throw new Error('loss is undefined')
this._losses = this._losses.push(loss)
}

get loss (): number | undefined {
return this._losses.last()
}

/** return loss of each round */
get losses (): List<number> {
return this._losses
Expand Down

0 comments on commit 708d4e7

Please sign in to comment.