Commit 26327cf5 authored by rusty1s's avatar rusty1s
Browse files

fixed pragmas

parent 69d73030
...@@ -26,9 +26,8 @@ def spline_basis_forward(degree, pseudo, kernel_size, is_open_spline, K): ...@@ -26,9 +26,8 @@ def spline_basis_forward(degree, pseudo, kernel_size, is_open_spline, K):
return basis, weight_index return basis, weight_index
# pragma: no cover
def spline_basis_backward(degree, grad_basis, pseudo, kernel_size, def spline_basis_backward(degree, grad_basis, pseudo, kernel_size,
is_open_spline): is_open_spline): # pragma: no cover
grad_pseudo = pseudo.new(pseudo.size()) grad_pseudo = pseudo.new(pseudo.size())
func = get_func('{}_basis_backward'.format(get_degree_str(degree)), pseudo) func = get_func('{}_basis_backward'.format(get_degree_str(degree)), pseudo)
func(grad_pseudo, grad_basis, pseudo, kernel_size, is_open_spline) func(grad_pseudo, grad_basis, pseudo, kernel_size, is_open_spline)
...@@ -42,24 +41,24 @@ def spline_weighting_forward(x, weight, basis, weight_index): ...@@ -42,24 +41,24 @@ def spline_weighting_forward(x, weight, basis, weight_index):
return output return output
# pragma: no cover def spline_weighting_backward_input(grad_output, weight, basis,
def spline_weighting_backward_input(grad_output, weight, basis, weight_index): weight_index): # pragma: no cover
grad_input = grad_output.new(grad_output.size(0), weight.size(1)) grad_input = grad_output.new(grad_output.size(0), weight.size(1))
func = get_func('weighting_backward_input', grad_output) func = get_func('weighting_backward_input', grad_output)
func(grad_input, grad_output, weight, basis, weight_index) func(grad_input, grad_output, weight, basis, weight_index)
return grad_input return grad_input
# pragma: no cover def spline_weighting_backward_basis(grad_output, x, weight,
def spline_weighting_backward_basis(grad_output, x, weight, weight_index): weight_index): # pragma: no cover
grad_basis = x.new(weight_index.size()) grad_basis = x.new(weight_index.size())
func = get_func('weighting_backward_basis', x) func = get_func('weighting_backward_basis', x)
func(grad_basis, grad_output, x, weight, weight_index) func(grad_basis, grad_output, x, weight, weight_index)
return grad_basis return grad_basis
# pragma: no cover def spline_weighting_backward_weight(grad_output, x, basis, weight_index,
def spline_weighting_backward_weight(grad_output, x, basis, weight_index, K): K): # pragma: no cover
grad_weight = x.new(K, x.size(1), grad_output.size(1)).fill_(0) grad_weight = x.new(K, x.size(1), grad_output.size(1)).fill_(0)
func = get_func('weighting_backward_weight', x) func = get_func('weighting_backward_weight', x)
func(grad_weight, grad_output, x, basis, weight_index) func(grad_weight, grad_output, x, basis, weight_index)
......
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