Spaces:
Running
on
Zero
Running
on
Zero
slslslrhfem
commited on
Commit
·
a2657b4
1
Parent(s):
6da214d
change probability func
Browse files- inference.py +1 -1
inference.py
CHANGED
|
@@ -165,7 +165,7 @@ def scaled_sigmoid(x, scale_factor=0.2, linear_property=0.3):
|
|
| 165 |
# Combine sigmoid with linear component
|
| 166 |
raw_prob = torch.sigmoid(scaled_x) * (1-linear_property) + linear_property * ((x + 25) / 50)
|
| 167 |
# Clip to ensure bounds
|
| 168 |
-
return torch.clamp(raw_prob, min=0.
|
| 169 |
|
| 170 |
# Apply the scaled sigmoid
|
| 171 |
|
|
|
|
| 165 |
# Combine sigmoid with linear component
|
| 166 |
raw_prob = torch.sigmoid(scaled_x) * (1-linear_property) + linear_property * ((x + 25) / 50)
|
| 167 |
# Clip to ensure bounds
|
| 168 |
+
return torch.clamp(raw_prob, min=0.001, max=0.999)
|
| 169 |
|
| 170 |
# Apply the scaled sigmoid
|
| 171 |
|