Axiovora-X / tensorflow /__init__.py
ZAIDX11's picture
Add files using upload-large-folder tool
19faf57 verified
"""Minimal stub for tensorflow to allow static imports in tests and linters.
This does not implement real TensorFlow functionality.
"""
from typing import Any
class Tensor:
def __init__(self, data: Any):
self.data = data
def constant(value: Any):
return Tensor(value)
def device(name: str):
class _ctx:
def __enter__(self):
return None
def __exit__(self, exc_type, exc, tb):
return False
return _ctx()