mirror of
https://github.com/karpathy/nanochat.git
synced 2025-12-06 04:12:13 +00:00
make code bit more succinct
This commit is contained in:
parent
a33d04dca1
commit
df9a644e24
|
|
@ -46,9 +46,7 @@ class Task:
|
|||
f"Using {num_ex} examples instead."
|
||||
)
|
||||
self.stop = num_ex
|
||||
stop = self.stop
|
||||
else:
|
||||
stop = self.num_examples()
|
||||
stop = self.num_examples() if self.stop is None else self.stop
|
||||
step = self.step
|
||||
span = stop - start
|
||||
num = (span + step - 1) // step # ceil_div(span, step)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user