Skip to content

Commit

Permalink
Merge pull request #3 from EBothereau/patch-1
Browse files Browse the repository at this point in the history
Grid Dimension issue
  • Loading branch information
rbSparky authored May 19, 2024
2 parents bbd475c + 0ab4f6f commit 6958c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/KAN.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module KAN
function KANLinear(in_features, out_features; grid_size=5, spline_order=3, scale_noise=0.1, scale_base=1.0,
scale_spline=1.0, enable_standalone_scale_spline=true, base_activation=sigmoid, grid_eps=0.02, grid_range=(-1, 1))
h = (grid_range[2] - grid_range[1]) / grid_size
grid = [i * h + grid_range[1] for i in -spline_order:grid_size+spline_order+1]
grid = [i * h + grid_range[1] for i in -spline_order:grid_size+spline_order]
grid = reshape(collect(repeat(grid, in_features)), in_features, :)

base_weight = randn(out_features, in_features) * sqrt(5) * scale_base
Expand Down

0 comments on commit 6958c05

Please sign in to comment.