@@ -164,12 +164,9 @@ struct GetColType
|
||||
};
|
||||
|
||||
template<typename MatType>
|
||||
struct GetUIntColType
|
||||
struct GetUColType
|
||||
{
|
||||
typedef typename MatType::elem_type eT;
|
||||
typedef typename std::conditional<
|
||||
std::is_same<eT, arma::uword>::value, eT, arma::uword>::type elem;
|
||||
typedef arma::Col<elem> type;
|
||||
typedef arma::Col<arma::uword> type;
|
||||
};
|
||||
|
||||
template<typename eT>
|
||||
@@ -221,12 +218,9 @@ struct GetDenseMatType
|
||||
};
|
||||
|
||||
template<typename MatType>
|
||||
struct GetUIntDenseMatType
|
||||
struct GetUDenseMatType
|
||||
{
|
||||
typedef typename MatType::elem_type eT;
|
||||
typedef typename std::conditional<
|
||||
std::is_same<eT, arma::uword>::value, eT, arma::uword>::type elem;
|
||||
typedef arma::Mat<elem> type;
|
||||
typedef arma::Mat<arma::uword> type;
|
||||
};
|
||||
|
||||
template<typename eT>
|
||||
|
||||
@@ -34,8 +34,8 @@ class RepeatType : public Layer<MatType>
|
||||
{
|
||||
public:
|
||||
//! Get Specific Col type, not only arma
|
||||
typedef typename GetUIntColType<MatType>::type UintCol;
|
||||
typedef typename GetUIntDenseMatType<MatType>::type UintMat;
|
||||
typedef typename GetUColType<MatType>::type UintCol;
|
||||
typedef typename GetUDenseMatType<MatType>::type UintMat;
|
||||
/**
|
||||
* Create the Repeat object. Multiples will be empty (e.g. 1s for all
|
||||
* dimensions), so this is the equivalent of an Identity Layer.
|
||||
|
||||
@@ -159,7 +159,7 @@ void RepeatType<MatType>::ComputeOutputDimensions()
|
||||
UintCol counts(inputSize, arma::fill::zeros);
|
||||
for (size_t i = 0; i < outIdxs.n_elem; i++)
|
||||
{
|
||||
auto r = outIdxs.at(i);
|
||||
arma::uword r = outIdxs.at(i);
|
||||
backIdxs.at(r, counts.at(r)++) = i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user