Commit 5b4ad784 authored by rusty1s's avatar rusty1s
Browse files

fix

parent d14df490
...@@ -31,7 +31,7 @@ const long* kernel_size, const long* is_open_spline, int num_threads) { ...@@ -31,7 +31,7 @@ const long* kernel_size, const long* is_open_spline, int num_threads) {
k_idx >>= 1; k_idx >>= 1;
value = input[e_idx * ${dim} + d_idx]; value = input[e_idx * ${dim} + d_idx];
if (value > 1) { a = 0; i = 0; break; } if (value < 0 || value > 1) { a = 0; i = 0; break; }
value *= kernel_size[d_idx] - is_open_spline[d_idx]; value *= kernel_size[d_idx] - is_open_spline[d_idx];
frac = value - floor(value); frac = value - floor(value);
......
...@@ -18,7 +18,8 @@ def spline_conv( ...@@ -18,7 +18,8 @@ def spline_conv(
backward_kernel, backward_kernel,
basis_kernel, basis_kernel,
degree=1, degree=1,
bias=None, ): bias=None):
if input.dim() == 1: if input.dim() == 1:
input = input.unsqueeze(1) input = input.unsqueeze(1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment