File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,25 @@ and parameter name.
207
207
| _ keyword-only_ | | |
208
208
| ` lr_scale ` | <tt >float</tt > | Rescale the learning rate. Defaults to ` 1.0 ` . |
209
209
210
+ ### Optimizer.last_score {#last_score tag="property", new="9"}
211
+
212
+ Get or set the last evaluation score. The optimizer passes this score to the
213
+ learning rate schedule, so that the schedule can take training dynamics into
214
+ account (see e.g. the [ ` plateau ` ] ( /docs/api-schedules#plateau ) schedule).
215
+
216
+ ``` python
217
+ # ## Example
218
+ from thinc.api import Optimizer, constant, plateau
219
+
220
+ schedule = plateau(2 , 0.5 , constant(1.0 ))
221
+ optimizer = Optimizer(learn_rate = schedule)
222
+ optimizer.last_score = (1000 , 88.34 )
223
+ ```
224
+
225
+ | Argument | Type | Description |
226
+ | ----------- | ------------------------------------ | ------------------------------------------ |
227
+ | ** RETURNS** | <tt >Optional[ Tuple[ int, float]] </tt > | The step and score of the last evaluation. |
228
+
210
229
### Optimizer.step_schedules {#step_schedules tag="method"}
211
230
212
231
Increase the current step of the optimizer. This step will be used by schedules
You can’t perform that action at this time.
0 commit comments