mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
training is False by default
This commit is contained in:
parent
8ba3d1f803
commit
e0bef0bd01
2 changed files with 2 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ if __name__ == "__main__":
|
|||
BS, steps = int(os.getenv("BS", "64" if TINY else "16")), 2048
|
||||
print("training with batch size %d for %d steps" % (BS, steps))
|
||||
|
||||
Tensor.training = True
|
||||
for i in (t := trange(steps)):
|
||||
samp = np.random.randint(0, X_train.shape[0], size=(BS))
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Device:
|
|||
|
||||
class Tensor:
|
||||
did_float_warning = False
|
||||
training = True
|
||||
training = False
|
||||
ops = defaultdict(dict)
|
||||
|
||||
def __init__(self, data, device=Device.DEFAULT, requires_grad=True):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue