12 #ifndef MLPACK_METHODS_ANN_VISITOR_SET_INPUT_HEIGHT_VISITOR_IMPL_HPP 13 #define MLPACK_METHODS_ANN_VISITOR_SET_INPUT_HEIGHT_VISITOR_IMPL_HPP 24 inputHeight(inputHeight),
30 template<
typename LayerType>
33 return LayerInputHeight(layer);
38 return layer.apply_visitor(*
this);
42 inline typename std::enable_if<
43 !HasInputHeight<T, size_t&(T::*)()>::value &&
44 !HasModelCheck<T>::value,
bool>::type
45 SetInputHeightVisitor::LayerInputHeight(T* )
const 51 inline typename std::enable_if<
52 HasInputHeight<T, size_t&(T::*)()>::value &&
53 !HasModelCheck<T>::value,
bool>::type
54 SetInputHeightVisitor::LayerInputHeight(T* layer)
const 56 if (layer->InputHeight() == 0 || reset)
58 layer->InputHeight() = inputHeight;
65 inline typename std::enable_if<
66 !HasInputHeight<T, size_t&(T::*)()>::value &&
67 HasModelCheck<T>::value,
bool>::type
68 SetInputHeightVisitor::LayerInputHeight(T* layer)
const 70 for (
size_t i = 0; i < layer->Model().size(); ++i)
80 inline typename std::enable_if<
81 HasInputHeight<T, size_t&(T::*)()>::value &&
82 HasModelCheck<T>::value,
bool>::type
83 SetInputHeightVisitor::LayerInputHeight(T* layer)
const 85 if (layer->InputHeight() == 0 || reset)
87 layer->InputHeight() = inputHeight;
90 for (
size_t i = 0; i < layer->Model().size(); ++i)
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1