GRAPH API MOTensor not working

Facing issues with graph API tutorial: https://docs.modular.com/engine/graph What is this MOTensor?
from max import graph

var m = graph.Module()

var g = m.graph(
"my_model",
in_types=MOTensor(DType.float32, 1, 28, 28, 1),
out_types=MOTensor(DType.float32, 1, 10),
)
from max import graph

var m = graph.Module()

var g = m.graph(
"my_model",
in_types=MOTensor(DType.float32, 1, 28, 28, 1),
out_types=MOTensor(DType.float32, 1, 10),
)
It's not available to me :/
error: use of unknown declaration 'MOTensor'
in_types= MOTensor(DType.float32, 1, 28, 28, 1)
error: use of unknown declaration 'MOTensor'
in_types= MOTensor(DType.float32, 1, 28, 28, 1)
Build a model with MAX Graph API | Modular Docs
Learn how to build a high-performance graph for MAX Engine.
1 Reply
taalhaataahir01022001
taalhaataahir01022001OP•10mo ago
got it! never imported it 😛
from max.graph import MOTensor
from max.graph import MOTensor
Want results from more Discord servers?
Add your server