We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9142d6 commit abea29bCopy full SHA for abea29b
src/pytorch_lightning/callbacks/batch_size_finder.py
@@ -31,8 +31,6 @@
31
class BatchSizeFinder(Callback):
32
SUPPORTED_MODES = ("power", "binsearch")
33
34
- optimal_batch_size: Optional[int]
35
-
36
def __init__(
37
self,
38
mode: str = "power",
@@ -73,7 +71,7 @@ def __init__(
73
71
mode = mode.lower()
74
72
if mode not in self.SUPPORTED_MODES:
75
raise ValueError(f"`mode` should be either of {self.SUPPORTED_MODES}")
76
- self.optimal_batch_size = init_val
+ self.optimal_batch_size: Optional[int] = init_val
77
self._mode = mode
78
self._steps_per_trial = steps_per_trial
79
self._init_val = init_val
0 commit comments