Skip to content

Commit aa9b8d3

Browse files
Dobiasdclaude
andcommitted
Remove unused this captures in activation lambdas (closes #460)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ccab164 commit aa9b8d3

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

include/fdeep/layers/hard_tanh_layer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace internal {
2525
protected:
2626
tensor transform_input(const tensor& in_vol) const override
2727
{
28-
return transform_tensor([this](float_type x) {
28+
return transform_tensor([](float_type x) {
2929
if (x < -1) {
3030
return static_cast<float_type>(-1);
3131
} else if (x > 1) {

include/fdeep/layers/log_sigmoid_layer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace internal {
2424
protected:
2525
tensor transform_input(const tensor& in_vol) const override
2626
{
27-
return transform_tensor([this](float_type x) {
27+
return transform_tensor([](float_type x) {
2828
return std::log(1 / (1 + std::exp(-x)));
2929
},
3030
in_vol);

include/fdeep/layers/log_softmax_layer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace internal {
2525
protected:
2626
tensor transform_input(const tensor& in_vol) const override
2727
{
28-
return transform_tensor([this](float_type x) {
28+
return transform_tensor([](float_type x) {
2929
return std::log(x);
3030
},
3131
softmax(in_vol));

include/fdeep/layers/sparse_plus_layer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace internal {
2424
protected:
2525
tensor transform_input(const tensor& in_vol) const override
2626
{
27-
return transform_tensor([this](float_type x) {
27+
return transform_tensor([](float_type x) {
2828
if (x <= -1) {
2929
return static_cast<float_type>(0);
3030
} else if (x < 1) {

include/fdeep/layers/tanh_shrink_layer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace internal {
2424
protected:
2525
tensor transform_input(const tensor& in_vol) const override
2626
{
27-
return transform_tensor([this](float_type x) {
27+
return transform_tensor([](float_type x) {
2828
return x - std::tanh(x);
2929
},
3030
in_vol);

0 commit comments

Comments
 (0)