diff --git a/include/fdeep/layers/subtract_layer.hpp b/include/fdeep/layers/subtract_layer.hpp index d86cc6c2..2d3a7a68 100644 --- a/include/fdeep/layers/subtract_layer.hpp +++ b/include/fdeep/layers/subtract_layer.hpp @@ -25,7 +25,7 @@ class subtract_layer : public layer { assertion(input.size() == 2, "subtract layer needs exactly two input tensors"); - return {subtract_tensor(input[0], input[1])}; + return {subtract_tensors(input[0], input[1])}; } }; diff --git a/include/fdeep/tensor.hpp b/include/fdeep/tensor.hpp index 3f6f9f5d..5da97af6 100644 --- a/include/fdeep/tensor.hpp +++ b/include/fdeep/tensor.hpp @@ -991,16 +991,6 @@ inline tensor dot_product_tensors( return output; } -inline tensor subtract_tensor(const tensor& a, const tensor& b) -{ - // todo: replace with subtract_tensors - assertion(a.shape() == b.shape(), - "both tensors must have the same size"); - auto result_values = fplus::zip_with(std::minus(), - *a.as_vector(), *b.as_vector()); - return tensor(a.shape(), result_values); -} - inline tensor average_tensors(const tensors& ts) { const auto sum = sum_tensors(ts);