frnet-p150 / code /tt_frnet /__init__.py
changh95's picture
tt-model push frnet-p150 (container)
fe51a63 verified
Raw History Blame Contribute Delete
1.35 kB
# SPDX-License-Identifier: Apache-2.0
"""FRNet (Autoware lidar_frnet) on a Tenstorrent Blackhole p150 (tt-nn), packaged as changh95/frnet-p150.
Python API (see PYTHON.md)::
from tt_frnet import FRNet
with FRNet.from_pretrained(device_id=0) as model:
out = model("code/tt_frnet/samples/synthetic_ot128.npz", calibration={"preset": "synthetic_ot128"})
Importing the package has no side effects (no device, no ttnn / torch import, no network); the names below load
on first use. The HTTP server is ``tt_frnet.server.app:app`` (SERVING.md). ``tt_frnet.ttaw`` is the
vendored shared package of the Autoware ports (``ttaw/VENDORED.json`` records its version and file hashes; never
edit it here).
"""
__version__ = "0.1.0"
__all__ = ["FRNet", "Output", "open_device", "load_points", "load_image", "__version__"]
_LAZY = {
"FRNet": (".api", "FRNet"),
"Output": (".api", "Output"),
"open_device": (".device", "open_device"),
"load_points": (".io", "load_points"),
"load_image": (".io", "load_image"),
}
def __getattr__(name):
if name in _LAZY:
import importlib
module, attr = _LAZY[name]
return getattr(importlib.import_module(module, __name__), attr)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
def __dir__():
return sorted(list(globals()) + __all__)