Skip to content
This repository was archived by the owner on Mar 2, 2025. It is now read-only.

Commit 1af8d20

Browse files
committed
Updated sin_estimate.mojo
1 parent 0ba5a48 commit 1af8d20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/sin_estimate.mojo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from random import rand
2-
from time.time import now
2+
from time.time import monotonic as now
33
import math
44

55
import basalt.nn as nn
@@ -44,7 +44,7 @@ fn main():
4444
# except: print("Could not render graph")
4545

4646
var model = nn.Model[graph]()
47-
var optimizer = nn.optim.Adam[graph](Reference(model.parameters), lr=learning_rate)
47+
var optimizer = nn.optim.Adam[graph](model.parameters, lr=learning_rate)
4848

4949
var x_data = Tensor[dtype](batch_size, n_inputs)
5050
var y_data = Tensor[dtype](batch_size, n_outputs)

0 commit comments

Comments
 (0)