python tiny_model.pyand/orpython model_bert_test.py- if changes made to mojo_dir/,
mojo package mojo_dir -o kernels.mojopkg
- set up mojo backend
- torch.abs
- torch.max
- torch.allclose
- torch.nn.functional.cosine_similarity
- torch.nn.Linear
- torch.nn.ReLU*
- torch.nn.Softmax*
- BertModel kernels
*note: do not print properly when printing the model
this project uses relative imports.
if you see any errors like
ValueError: Path provided as custom extension to Graph must be a Mojo source or binary package: kernels.mojopkg
that means kernels.mojopkg cannot be found by examples/*.py. please run these files from the root directory like
python examples/*.py
if you see any errors like
ModuleNotFoundError: No module named 'mojo_custom_class'
run this in the root directory:
export PYTHONPATH=$(pwd)