Instructions to use replicate/relu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/relu with Kernels:
# !pip install kernels from kernels import get_kernel # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("replicate/relu", version=1) - Notebooks
- Google Colab
- Kaggle
Build uploaded using `kernels`.
Browse files
.gitattributes
CHANGED
|
@@ -197,3 +197,4 @@ build/torch29-cxx11-rocm63-x86_64-linux/_relu_53eed8c.abi3.so filter=lfs diff=lf
|
|
| 197 |
build/torch29-cxx11-rocm64-x86_64-linux/_relu_53eed8c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 198 |
build/torch29-cxx11-xpu20252-x86_64-linux/_relu_53eed8c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 199 |
build/torch210-metal-aarch64-darwin/_relu_ff7d195.abi3.so filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 197 |
build/torch29-cxx11-rocm64-x86_64-linux/_relu_53eed8c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 198 |
build/torch29-cxx11-xpu20252-x86_64-linux/_relu_53eed8c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 199 |
build/torch210-metal-aarch64-darwin/_relu_ff7d195.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 200 |
+
build/torch210-cu128-x86_64-windows/relu/_relu_d7b860a.pyd filter=lfs diff=lfs merge=lfs -text
|
build/torch210-cu128-x86_64-windows/metadata.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": 1,
|
| 3 |
+
"python-depends": []
|
| 4 |
+
}
|
build/torch210-cu128-x86_64-windows/relu/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Optional
|
| 2 |
+
|
| 3 |
+
import torch
|
| 4 |
+
|
| 5 |
+
from ._ops import ops
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def relu(x: torch.Tensor, out: Optional[torch.Tensor] = None) -> torch.Tensor:
|
| 9 |
+
if out is None:
|
| 10 |
+
out = torch.empty_like(x)
|
| 11 |
+
ops.relu(out, x)
|
| 12 |
+
return out
|
build/torch210-cu128-x86_64-windows/relu/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _relu_d7b860a
|
| 3 |
+
ops = torch.ops._relu_d7b860a
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_relu_d7b860a::{op_name}"
|
build/torch210-cu128-x86_64-windows/relu/_relu_d7b860a.pyd
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d8485c2194b53b832e3a30c93a0051ca96bdea46890d64d1fbec3dee23037b27
|
| 3 |
+
size 203264
|