12 #ifndef MLPACK_METHODS_ANN_VISITOR_SET_INPUT_WIDTH_VISITOR_IMPL_HPP 13 #define MLPACK_METHODS_ANN_VISITOR_SET_INPUT_WIDTH_VISITOR_IMPL_HPP 24 inputWidth(inputWidth),
30 template<
typename LayerType>
33 return LayerInputWidth(layer);
38 return layer.apply_visitor(*
this);
42 inline typename std::enable_if<
43 !HasInputWidth<T, size_t&(T::*)()>::value &&
44 !HasModelCheck<T>::value,
bool>::type
45 SetInputWidthVisitor::LayerInputWidth(T* )
const 51 inline typename std::enable_if<
52 HasInputWidth<T, size_t&(T::*)()>::value &&
53 !HasModelCheck<T>::value,
bool>::type
54 SetInputWidthVisitor::LayerInputWidth(T* layer)
const 56 if (layer->InputWidth() == 0 || reset)
58 layer->InputWidth() = inputWidth;
65 inline typename std::enable_if<
66 !HasInputWidth<T, size_t&(T::*)()>::value &&
67 HasModelCheck<T>::value,
bool>::type
68 SetInputWidthVisitor::LayerInputWidth(T* layer)
const 70 for (
size_t i = 0; i < layer->Model().size(); ++i)
80 inline typename std::enable_if<
81 HasInputWidth<T, size_t&(T::*)()>::value &&
82 HasModelCheck<T>::value,
bool>::type
83 SetInputWidthVisitor::LayerInputWidth(T* layer)
const 85 if (layer->InputWidth() == 0 || reset)
87 layer->InputWidth() = inputWidth;
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