13 #ifndef MLPACK_METHODS_ANN_LAYER_VR_CLASS_REWARD_HPP 14 #define MLPACK_METHODS_ANN_LAYER_VR_CLASS_REWARD_HPP 35 typename InputDataType = arma::mat,
36 typename OutputDataType = arma::mat
47 VRClassReward(
const double scale = 1,
const bool sizeAverage =
true);
57 template<
typename InputType,
typename TargetType>
58 double Forward(
const InputType& input,
const TargetType& target);
71 template<
typename InputType,
typename TargetType,
typename OutputType>
72 void Backward(
const InputType& input,
73 const TargetType& target,
82 OutputDataType&
Delta()
const {
return delta; }
84 OutputDataType&
Delta() {
return delta; }
91 template <
class LayerType,
class... Args>
92 void Add(Args... args) { network.push_back(
new LayerType(args...)); }
99 void Add(LayerTypes<> layer) { network.push_back(layer); }
102 std::vector<LayerTypes<> >&
Model() {
return network; }
108 double Scale()
const {
return scale; }
113 template<
typename Archive>
114 void serialize(Archive& ,
const uint32_t );
127 OutputDataType delta;
130 OutputDataType outputParameter;
133 std::vector<LayerTypes<> > network;
bool SizeAverage() const
Get the value of parameter sizeAverage.
Definition: vr_class_reward.hpp:105
OutputDataType & Delta()
Modify the delta.
Definition: vr_class_reward.hpp:84
Implementation of the Add module class.
Definition: add.hpp:34
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Scale() const
Get the value of scale parameter.
Definition: vr_class_reward.hpp:108
OutputDataType & Delta() const
Get the delta.
Definition: vr_class_reward.hpp:82
VRClassReward(const double scale=1, const bool sizeAverage=true)
Create the VRClassReward object.
Definition: vr_class_reward_impl.hpp:25
void Backward(const InputType &input, const TargetType &target, OutputType &output)
Ordinary feed backward pass of a neural network.
Definition: vr_class_reward_impl.hpp:69
double Forward(const InputType &input, const TargetType &target)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
Definition: vr_class_reward_impl.hpp:37
OutputDataType & OutputParameter() const
Get the output parameter.
Definition: vr_class_reward.hpp:77
std::vector< LayerTypes<> > & Model()
Get the network modules.
Definition: vr_class_reward.hpp:102
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: vr_class_reward.hpp:79
void serialize(Archive &, const uint32_t)
Serialize the layer.
Definition: vr_class_reward_impl.hpp:98