27 #ifndef LBANN_OBJECTIVE_FUNCTION_TERM_HPP_INCLUDED 28 #define LBANN_OBJECTIVE_FUNCTION_TERM_HPP_INCLUDED 34 class ObjectiveFunction;
64 template <
class Archive>
68 virtual std::string name()
const = 0;
71 virtual void setup(
model& m);
77 virtual void start_evaluation() = 0;
80 virtual EvalType finish_evaluation() = 0;
86 virtual void differentiate() = 0;
91 virtual void compute_weight_regularization() = 0;
94 std::vector<ViewingLayerPtr> get_layer_pointers()
const;
96 void set_layer_pointers(std::vector<ViewingLayerPtr> layers);
98 std::vector<ViewingWeightsPtr> get_weights_pointers()
const;
100 void set_weights_pointers(std::vector<ViewingWeightsPtr> w);
104 write_specific_proto(lbann_data::ObjectiveFunction& proto)
const = 0;
125 #endif // LBANN_OBJECTIVE_FUNCTION_TERM_INCLUDED std::weak_ptr< Layer > ViewingLayerPtr
Smart pointer to reference a layer object.
std::vector< ViewingWeightsPtr > m_weights
void serialize(std::ostream &os, google::protobuf::Message const &msg)
Serialize the protobuf message to a stream.
Abstract base class for neural network models.
std::weak_ptr< weights > ViewingWeightsPtr
Smart pointer to reference a weights object.
std::vector< ViewingLayerPtr > m_layers