#include <sigmoidop.h>
Public Member Functions | |
SigmoidOp (Operation< T > *x, bool copy=true, bool fast=true) | |
std::string | to_string () |
![]() | |
Operation () | |
Operation (std::vector< Operation< T > *> inputs, bool needs_grad=true) | |
virtual std::vector< unsigned int > | get_output_shape () const |
virtual unsigned int | get_output_shape (unsigned int idx) const |
virtual unsigned int | get_output_size () const |
virtual memory_t | get_memory_type () const |
virtual Tensor< T > * | eval (bool recompute=true) |
virtual void | reset () |
virtual Tensor< T > * | grad (Operation< T > *consumer, Operation< T > *var, Tensor< T > *grad, bool recompute=true) |
virtual void | add_consumer (Operation< T > *consumer) |
virtual std::vector< Operation< T > * > | get_consumers () |
virtual std::vector< Operation< T > * > | get_inputs () |
virtual Tensor< T > * | get_output_tensor () |
virtual Tensor< T > * | get_grad_tensor (Operation< T > *wrt) |
virtual std::string | get_name () |
Protected Member Functions | |
Tensor< T > * | _eval (bool recompute=true) |
Tensor< T > * | _grad (Operation< T > *consumer, Operation< T > *var, Tensor< T > *grad) |
Protected Attributes | |
Operation< T > * | x |
Tensor< T > * | x_tensor |
bool | copy |
bool | fast |
![]() | |
std::vector< Operation< T > * > | inputs |
std::vector< Operation< T > * > | consumers |
std::vector< unsigned int > | output_shape |
memory_t | mem_type |
std::map< uintptr_t, Tensor< T > * > | _grad_cache |
std::string | name = "DefaultOpName" |
Tensor< T > * | output_tensor |
bool | needs_grad |
bool | has_been_computed |
bool | has_grad_been_computed |
Sigmoid Operation. Computes the element-wise sigmoid operation on a Tensor.
T |
|
protectedvirtual |
Sets this->output_tensor to the value of this operation
Implements magmadnn::op::Operation< T >.
|
protectedvirtual |
Computes the gradient of this operation wrt the output of consumer.
consumer | |
var | |
grad | |
recompute |
Implements magmadnn::op::Operation< T >.
|
inlinevirtual |
string form of the given operation. Expands on input.
Implements magmadnn::op::Operation< T >.