21 for (
int i = 0;
i <
arity[
'f'];
i++) {
33 ArrayXf x1 = state.
pop<
float>();
34 ArrayXf x2 = state.
pop<
float>();
55 ArrayXf& x1 = state.
get<
float>()[state.
size<
float>()-1];
56 ArrayXf& x2 = state.
get<
float>()[state.
size<
float>()-2];
61 this->
W[1] * x2) *
limited(log(this->
W[0] * x1)) * x2);
63 return limited(this->
W[1] * x2 * pow(this->
W[0] * x1,
64 this->
W[1] * x2) / this->
W[0]);
66 return limited(this->
W[1]*pow(this->
W[0] * x1,
67 this->
W[1] * x2) *
limited(log(this->
W[0] * x1)));
70 return limited(this->
W[1] * x2 * pow(this->
W[0] * x1, this->
W[1] * x2) / x1);
data holding X, y, and Z data
NodeExponent(vector< float > W0=vector< float >())
void eval_eqn(State &state)
Evaluates the node symbolically.
NodeExponent * rnd_clone_impl() const override
ArrayXf getDerivative(Trace &state, int loc)
void evaluate(const Data &data, State &state)
Evaluates the node and updates the state states.
NodeExponent * clone_impl() const override
std::map< char, unsigned int > arity
arity of the operator
ArrayXf limited(ArrayXf x)
limits node output to be between MIN_FLT and MAX_FLT
int complexity
complexity of node
float rnd_dbl(float min=0.0, float max=1.0)
void GPU_Exponent(float *x, size_t idx, size_t N, float W0, float W1)
std::string to_string(const T &value)
template function to convert objects to string for logging
contains various types of State actually used by feat
Eigen::Array< T, Eigen::Dynamic, 1 > pop()
void push(Eigen::Array< T, Eigen::Dynamic, 1 > value)
used for tracing stack outputs for backprop algorithm.
vector< Eigen::Array< T, Eigen::Dynamic, 1 > > & get()