You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The earliest design had *Node implement tensor.Tensor. Time to make that happen again. h/t @docmerlin for suggesting that
So the general gist is this:
Create a Tensor interface that mirrors a subset of tensor.Tensor (without the private methods).
*Node implements Tensor
Create a SymbolicEngine method that implements tensor.Engine
Write generator to generate methods in operations.go and other operations. The methods will change from: func Add(a, b *Node) (*Node, error) to func Add(a, b Tensor) (Tensor, error) . This allows for passing in tensor.Tensor in those, which will make the API a LOT simpler.
Simplify the data structure for *Node to remove pointers to prevent GC from chasing them
The earliest design had
*Node
implementtensor.Tensor
. Time to make that happen again. h/t @docmerlin for suggesting thatSo the general gist is this:
Tensor
interface that mirrors a subset oftensor.Tensor
(without the private methods).*Node
implementsTensor
SymbolicEngine
method that implementstensor.Engine
operations.go
and other operations. The methods will change from:func Add(a, b *Node) (*Node, error)
tofunc Add(a, b Tensor) (Tensor, error)
. This allows for passing intensor.Tensor
in those, which will make the API a LOT simpler.*Node
to remove pointers to prevent GC from chasing themtensor.Shape
object betweentensor.Tensor
and*Node
#163The text was updated successfully, but these errors were encountered: