Spaces:
Runtime error
Runtime error
Download model.py from nikethanreddy/project2: direct link, hf CLI and curl.
- Browser
- Download file 620 Bytes
-
https://huggingface.co/spaces/nikethanreddy/project2/resolve/main/model.py
- Command line
-
hf download hf://spaces/nikethanreddy/project2/model.py
-
curl -L -o model.py https://huggingface.co/spaces/nikethanreddy/project2/resolve/main/model.py
620 Bytes
| # model.py | |
| import flax.linen as nn | |
| import jax.numpy as jnp | |
| class AQIPredictor(nn.Module): | |
| features: int | |
| def __call__(self, x, deterministic: bool): | |
| x = nn.Conv(features=64, kernel_size=(3,))(x) | |
| x = nn.relu(x) | |
| x = nn.LayerNorm()(x) | |
| x = nn.Conv(features=64, kernel_size=(3,))(x) | |
| x = nn.relu(x) | |
| x = nn.LayerNorm()(x) | |
| x = jnp.mean(x, axis=1) | |
| x = nn.Dense(128)(x) | |
| x = nn.Dropout(0.1)(nn.silu(x), deterministic=deterministic) | |
| x = nn.Dense(64)(x) | |
| x = nn.silu(x) | |
| return nn.Dense(1)(x) | |