fix: remove sigmoid derivative from backprop
This commit is contained in:
@@ -108,7 +108,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
void backprop(const input_type& input, const output_type& expected, learning_state& state) {
|
void backprop(const input_type& input, const output_type& expected, learning_state& state) {
|
||||||
feed(input);
|
feed(input);
|
||||||
auto outputErr = (get_output().get() - expected).hadamard(get_output()).hadamard(1.0 - get_output().get());
|
auto outputErr = get_output().get() - expected;
|
||||||
get_layer<0>().backward(input,
|
get_layer<0>().backward(input,
|
||||||
std::get<0>(state.m_layers),
|
std::get<0>(state.m_layers),
|
||||||
backprop_chain<sizeof...(Layers) - 1>(state, outputErr));
|
backprop_chain<sizeof...(Layers) - 1>(state, outputErr));
|
||||||
|
|||||||
Reference in New Issue
Block a user