Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/autograd/graph.mojo:4:
Included from /home/jure/Projekti/basalt/basalt/autograd/node.mojo:7:
/home/jure/Projekti/basalt/basalt/autograd/attributes.mojo:45:21: error: use of unknown declaration 'StaticTuple'
var attributes: StaticTuple[Attribute, MAX_ATTRS]
^~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:25:
/home/jure/Projekti/basalt/basalt/utils/bytes.mojo:13:15: error: use of unknown declaration 'StaticTuple'
var data: StaticTuple[UInt8, capacity]
^~~~~~~~~~~
/home/jure/Projekti/basalt/examples/housing.mojo:37:37: error: invalid initialization: could not deduce parameter 'mutability' of parent struct 'Adam'
var optim = nn.optim.Adam[graph](Reference(model.parameters), lr=learning_rate)
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/optim.mojo:23:8: note: struct declared here
struct Adam[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/optim.mojo:40:8: note: function declared here
fn __init__(
^
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/autograd/graph.mojo:4:
Included from /home/jure/Projekti/basalt/basalt/autograd/node.mojo:7:
/home/jure/Projekti/basalt/basalt/autograd/attributes.mojo:50:27: error: use of unknown declaration 'StaticTuple', 'fn' declarations require explicit variable declarations
self.attributes = StaticTuple[Attribute, MAX_ATTRS]()
^~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/autograd/graph.mojo:4:
Included from /home/jure/Projekti/basalt/basalt/autograd/node.mojo:7:
/home/jure/Projekti/basalt/basalt/autograd/attributes.mojo:53:17: error: 'AttributeVector' value has no attribute 'attributes'
self.attributes[i] = attributes[i]
~~~~^
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/autograd/graph.mojo:4:
Included from /home/jure/Projekti/basalt/basalt/autograd/node.mojo:7:
/home/jure/Projekti/basalt/basalt/autograd/attributes.mojo:61:20: error: 'AttributeVector' value has no attribute 'attributes'
return self.attributes[index]
~~~~^
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/autograd/graph.mojo:4:
Included from /home/jure/Projekti/basalt/basalt/autograd/node.mojo:7:
/home/jure/Projekti/basalt/basalt/autograd/attributes.mojo:66:20: error: 'AttributeVector' value has no attribute 'attributes'
if self.attributes[i].name == Bytes[MAX_NAME_CHARS](index):
~~~~^
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/autograd/graph.mojo:4:
Included from /home/jure/Projekti/basalt/basalt/autograd/node.mojo:7:
/home/jure/Projekti/basalt/basalt/autograd/attributes.mojo:74:26: error: 'AttributeVector' value has no attribute 'attributes'
s += str(self.attributes[i])
~~~~^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:25:
/home/jure/Projekti/basalt/basalt/utils/bytes.mojo:17:20: error: use of unknown declaration 'StaticTuple', 'fn' declarations require explicit variable declarations
var data = StaticTuple[UInt8, capacity]()
^~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:25:
/home/jure/Projekti/basalt/basalt/utils/bytes.mojo:27:20: error: use of unknown declaration 'StaticTuple', 'fn' declarations require explicit variable declarations
var data = StaticTuple[UInt8, capacity]()
^~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:1:18: error: package 'math' does not contain 'min'
from math import min
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:21:50: error: unexpected token in expression
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:21:50: error: statements must start at the beginning of a line
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:28:50: error: unexpected token in expression
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:28:50: error: statements must start at the beginning of a line
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:35:50: error: unexpected token in expression
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:35:50: error: statements must start at the beginning of a line
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:42:50: error: unexpected token in expression
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:42:50: error: statements must start at the beginning of a line
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:54:50: error: unexpected token in expression
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:54:50: error: statements must start at the beginning of a line
for i in range(min(self._rank, MAX_RANK)):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:100:39: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
return self.parameters.tensors[g.loss_out.value()]
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:100:39: note: failed to infer parameter 'mutability', parameter isn't used in any argument
return self.parameters.tensors[g.loss_out.value()]
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:116:36: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.tensors[g.inputs[i]] = t_input[i]
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:116:36: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.tensors[g.inputs[i]] = t_input[i]
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:146:48: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.tensors[out], self.parameters.tensors[t1]
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:146:48: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.tensors[out], self.parameters.tensors[t1]
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:152:48: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.tensors[out],
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:152:48: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.tensors[out],
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:161:48: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.tensors[out],
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:161:48: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.tensors[out],
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:181:39: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
fill(self.parameters.grads[g.loss_out.value()], 1.0)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:181:39: note: failed to infer parameter 'mutability', parameter isn't used in any argument
fill(self.parameters.grads[g.loss_out.value()], 1.0)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:190:38: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.grads[node_outputs[i]] = upper_grads[i]
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:190:38: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.grads[node_outputs[i]] = upper_grads[i]
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:215:50: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.grads[g.nodes[reverse_i].inputs[j]],
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:215:50: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.grads[g.nodes[reverse_i].inputs[j]],
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:232:50: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:232:50: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:244:50: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:244:50: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:253:50: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:253:50: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:269:50: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:269:50: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:281:50: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:281:50: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:293:50: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
/home/jure/Projekti/basalt/basalt/nn/model.mojo:293:50: note: failed to infer parameter 'mutability', parameter isn't used in any argument
self.parameters.grads[out],
~~~~~~~~~~~~~~~~~~~~~^~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:1:18: error: package 'math' does not contain 'max'
from math import max
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
/home/jure/Projekti/basalt/basalt/nn/tensor.mojo:148:34: error: 'Tensor[dtype]' value has no attribute 'data'
memcpy(self._data, tensor.data(), self._shape.num_elements())
~~~~~~^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:9:
/home/jure/Projekti/basalt/basalt/utils/tensorutils.mojo:4:46: error: package 'math' does not contain 'add'
from math import sqrt, pow, equal, max, min, add, div, divmod, abs
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:9:
/home/jure/Projekti/basalt/basalt/utils/tensorutils.mojo:4:51: error: package 'math' does not contain 'div'
from math import sqrt, pow, equal, max, min, add, div, divmod, abs
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:25:
/home/jure/Projekti/basalt/basalt/utils/bytes.mojo:42:13: error: 'Bytes[capacity]' value has no attribute 'data'
self.data[index] = value
~~~~^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:25:
/home/jure/Projekti/basalt/basalt/utils/bytes.mojo:46:20: error: 'Bytes[capacity]' value has no attribute 'data'
return self.data[index]
~~~~^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:9:
/home/jure/Projekti/basalt/basalt/utils/tensorutils.mojo:4:36: error: package 'math' does not contain 'max'
from math import sqrt, pow, equal, max, min, add, div, divmod, abs
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:9:
/home/jure/Projekti/basalt/basalt/utils/tensorutils.mojo:4:64: error: package 'math' does not contain 'abs'
from math import sqrt, pow, equal, max, min, add, div, divmod, abs
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:9:
/home/jure/Projekti/basalt/basalt/utils/tensorutils.mojo:62:43: error: unexpected token in expression
for i in range(ndim - 1, diff - 1, -1):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:9:
/home/jure/Projekti/basalt/basalt/utils/tensorutils.mojo:62:43: error: statements must start at the beginning of a line
for i in range(ndim - 1, diff - 1, -1):
^
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:9:
/home/jure/Projekti/basalt/basalt/utils/tensorutils.mojo:4:56: error: package 'math' does not contain 'divmod'
from math import sqrt, pow, equal, max, min, add, div, divmod, abs
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:1:
/home/jure/Projekti/basalt/basalt/autograd/ops/basics.mojo:1:33: error: package 'math' does not contain 'div'
from math import add, sub, mul, div, log, exp
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:1:
/home/jure/Projekti/basalt/basalt/autograd/ops/basics.mojo:1:28: error: package 'math' does not contain 'mul'
from math import add, sub, mul, div, log, exp
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:21:
/home/jure/Projekti/basalt/basalt/autograd/ops/pool.mojo:1:11: error: unable to locate module 'limit'
from math.limit import neginf
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:1:
/home/jure/Projekti/basalt/basalt/autograd/ops/basics.mojo:1:18: error: package 'math' does not contain 'add'
from math import add, sub, mul, div, log, exp
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:1:
/home/jure/Projekti/basalt/basalt/autograd/ops/basics.mojo:1:23: error: package 'math' does not contain 'sub'
from math import add, sub, mul, div, log, exp
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:20:
/home/jure/Projekti/basalt/basalt/autograd/ops/conv.mojo:6:18: error: package 'math' does not contain 'divmod'
from math import divmod
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:19:
/home/jure/Projekti/basalt/basalt/autograd/ops/dynamics.mojo:50:39: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
parameters.tensors[outputs[0]].data()
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:19:
/home/jure/Projekti/basalt/basalt/autograd/ops/dynamics.mojo:50:39: note: failed to infer parameter 'mutability', parameter isn't used in any argument
parameters.tensors[outputs[0]].data()
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:19:
/home/jure/Projekti/basalt/basalt/autograd/ops/dynamics.mojo:76:33: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
parameters.grads[outputs[0]].data()
~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:19:
/home/jure/Projekti/basalt/basalt/autograd/ops/dynamics.mojo:76:33: note: failed to infer parameter 'mutability', parameter isn't used in any argument
parameters.grads[outputs[0]].data()
~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:19:
/home/jure/Projekti/basalt/basalt/autograd/ops/dynamics.mojo:131:39: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
parameters.tensors[outputs[j]].data() + i * chunks[j],
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:19:
/home/jure/Projekti/basalt/basalt/autograd/ops/dynamics.mojo:131:39: note: failed to infer parameter 'mutability', parameter isn't used in any argument
parameters.tensors[outputs[j]].data() + i * chunks[j],
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:19:
/home/jure/Projekti/basalt/basalt/autograd/ops/dynamics.mojo:162:37: error: invalid call to '__refitem__': callee expects 2 parameters, but 0 were specified
parameters.grads[outputs[j]].data() + i * chunks[j],
~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:19:
/home/jure/Projekti/basalt/basalt/autograd/ops/dynamics.mojo:162:37: note: failed to infer parameter 'mutability', parameter isn't used in any argument
parameters.grads[outputs[j]].data() + i * chunks[j],
~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/nn/__init__.mojo:2:
Included from /home/jure/Projekti/basalt/basalt/nn/model.mojo:8:
/home/jure/Projekti/basalt/basalt/utils/collection.mojo:118:8: note: function declared here
fn __refitem__[
^
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/__init__.mojo:1:
Included from /home/jure/Projekti/basalt/basalt/autograd/ops/ops.mojo:18:
/home/jure/Projekti/basalt/basalt/autograd/ops/mlops.mojo:2:28: error: package 'math' does not contain 'max'
from math import exp, pow, max, min, abs
^
mojo: error: failed to parse the provided Mojo source module