mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-12 19:23:55 +00:00
Merge pull request #10001 from freqtrade/fix/epoch-definition
Update PyTorchModelTrainer.py
This commit is contained in:
commit
41d508867e
|
@ -152,7 +152,7 @@ class PyTorchModelTrainer(PyTorchTrainerInterface):
|
||||||
"""
|
"""
|
||||||
assert isinstance(self.n_steps, int), "Either `n_steps` or `n_epochs` should be set."
|
assert isinstance(self.n_steps, int), "Either `n_steps` or `n_epochs` should be set."
|
||||||
n_batches = n_obs // self.batch_size
|
n_batches = n_obs // self.batch_size
|
||||||
n_epochs = min(self.n_steps // n_batches, 1)
|
n_epochs = max(self.n_steps // n_batches, 1)
|
||||||
if n_epochs <= 10:
|
if n_epochs <= 10:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"Setting low n_epochs: {n_epochs}. "
|
f"Setting low n_epochs: {n_epochs}. "
|
||||||
|
|
Loading…
Reference in New Issue
Block a user