Instructions to use kernels-community/relu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/relu with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("kernels-community/relu") - Notebooks
- Google Colab
- Kaggle
| from typing import Optional | |
| import torch | |
| from ._ops import ops | |
| from . import layers | |
| def relu(x: torch.Tensor, out: Optional[torch.Tensor] = None) -> torch.Tensor: | |
| if out is None: | |
| out = torch.empty_like(x) | |
| ops.relu(out, x) | |
| return out | |
| __all__ = ["relu", "layers"] | |