@@ -14,7 +14,7 @@ namespace Modules
1414 /// </summary>
1515 public sealed class Softplus : ParameterLessModule < Tensor , Tensor >
1616 {
17- internal Softplus ( int beta = 1 , int threshold = 20 ) : base ( nameof ( Softplus ) )
17+ internal Softplus ( double beta = 1 , double threshold = 20 ) : base ( nameof ( Softplus ) )
1818 {
1919 this . beta = beta ;
2020 this . threshold = threshold ;
@@ -25,8 +25,8 @@ public override Tensor forward(Tensor tensor)
2525 return torch . nn . functional . softplus ( tensor , beta , threshold ) ;
2626 }
2727
28- public int beta { get ; set ; }
29- public int threshold { get ; set ; }
28+ public double beta { get ; set ; }
29+ public double threshold { get ; set ; }
3030 }
3131 }
3232
@@ -40,7 +40,7 @@ public static partial class nn
4040 /// <param name="beta">The β value for the Softplus formulation.</param>
4141 /// <param name="threshold">Values above this revert to a linear function</param>
4242 /// <returns></returns>
43- public static Softplus Softplus ( int beta = 1 , int threshold = 20 )
43+ public static Softplus Softplus ( double beta = 1 , double threshold = 20 )
4444 {
4545 return new Softplus ( beta , threshold ) ;
4646 }
@@ -54,7 +54,7 @@ public static partial class functional
5454 /// <param name="beta">The β value for the Softplus formulation.</param>
5555 /// <param name="threshold">Values above this revert to a linear function</param>
5656 /// <returns></returns>
57- public static Tensor softplus ( Tensor x , int beta = 1 , int threshold = 20 )
57+ public static Tensor softplus ( Tensor x , double beta = 1 , double threshold = 20 )
5858 {
5959 return x . softplus ( beta , threshold ) ;
6060 }
0 commit comments