Instructions to use prosoro/fingernet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prosoro/fingernet with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("prosoro/fingernet", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload modeling.py with huggingface_hub
Browse files- modeling.py +2 -1
modeling.py
CHANGED
|
@@ -30,10 +30,11 @@ class FingerNet(PreTrainedModel):
|
|
| 30 |
self.h1_dim = config.h1_dim
|
| 31 |
self.h2_dim = config.h2_dim
|
| 32 |
|
|
|
|
| 33 |
# Define the model architecture
|
| 34 |
for i in range(len(self.y_dim)):
|
| 35 |
setattr(
|
| 36 |
-
self,
|
| 37 |
f"estimator_{i}",
|
| 38 |
nn.Sequential(
|
| 39 |
nn.Linear(self.x_dim[0], self.h1_dim[i]),
|
|
|
|
| 30 |
self.h1_dim = config.h1_dim
|
| 31 |
self.h2_dim = config.h2_dim
|
| 32 |
|
| 33 |
+
self.model = nn.Module()
|
| 34 |
# Define the model architecture
|
| 35 |
for i in range(len(self.y_dim)):
|
| 36 |
setattr(
|
| 37 |
+
self.model,
|
| 38 |
f"estimator_{i}",
|
| 39 |
nn.Sequential(
|
| 40 |
nn.Linear(self.x_dim[0], self.h1_dim[i]),
|