M
Modular•10mo ago
NicG

Mojo Yolo?

What would be the easiest way to implement Yolo in Mojo? I've previously written an inference only implementation from scratch (using no libs) in rust (which shares similar features to mojo), so I'm not too bothered about the language side, or the 'understanding yolo' side. What I AM wondering is how python module support is implemented under the hood I guess. If I
Python.import_module(pytorch)
Python.import_module(pytorch)
(or whatever) does that mean that all calls to this library are mediated by a python interpreter? Or does mojo just compile the calls directly to libtorch.so using some FFI magic? If it's the former, what approach would you suggest? Just porting my rust code and using mojo's built-in tensor module?
3 Replies
NicG
NicGOP•10mo ago
nevermind: This thread (https://discord.com/channels/1087530497313357884/1206879137550307328) seems to say it's all run via the interpreter. Wierd choice, but okay. @benny I had a bit of a dig around in your library 🙂 didn't get to the bottom of everything, but what Im2Col implementation do you use?
benny
benny•10mo ago
i used the matlab docs as a reference, but I changed it a lot afterwards to work better with mojo (hence the tile function), your welcome to copy the functions for your own use case
NicG
NicGOP•10mo ago
Sweet. Yolo's just a bunch of conv2d and maxpool mostly(and cat..., and upscale...., and...) , so I should be able to use voodoo without having to call out to any other libs. Thanks mate!
Want results from more Discord servers?
Add your server