Commit fd619d7a authored by Xingyu Na's avatar Xingyu Na

convolution->convolutional1d

parent 7e09c660
...@@ -3927,9 +3927,9 @@ void Convolutional1dComponent::Add(BaseFloat alpha, const UpdatableComponent &ot ...@@ -3927,9 +3927,9 @@ void Convolutional1dComponent::Add(BaseFloat alpha, const UpdatableComponent &ot
of lists, The list at (backward_indexes[i]) is a list of lists, The list at (backward_indexes[i]) is a list
of all indexes j such that forward_indexes[j] = i. of all indexes j such that forward_indexes[j] = i.
*/ */
void ConvolutionComponent::ReverseIndexes(const std::vector<int32> &forward_indexes, void Convolutional1dComponent::ReverseIndexes(const std::vector<int32> &forward_indexes,
int32 input_dim, int32 input_dim,
std::vector<std::vector<int32> > *backward_indexes) { std::vector<std::vector<int32> > *backward_indexes) {
int32 i; int32 i;
backward_indexes->resize(input_dim); backward_indexes->resize(input_dim);
for (int32 j = 0; j < forward_indexes.size(); j++) { for (int32 j = 0; j < forward_indexes.size(); j++) {
...@@ -3950,8 +3950,8 @@ void ConvolutionComponent::ReverseIndexes(const std::vector<int32> &forward_inde ...@@ -3950,8 +3950,8 @@ void ConvolutionComponent::ReverseIndexes(const std::vector<int32> &forward_inde
out[k][j] = i. The output vectors are padded with -1 out[k][j] = i. The output vectors are padded with -1
where necessary if not all the input lists have the same side. where necessary if not all the input lists have the same side.
*/ */
void ConvolutionComponent::RearrangeIndexes(const std::vector<std::vector<int32> > &in, void Convolutional1dComponent::RearrangeIndexes(const std::vector<std::vector<int32> > &in,
std::vector<std::vector<int32> > *out) { std::vector<std::vector<int32> > *out) {
int32 D = in.size(); int32 D = in.size();
int32 L = 0; int32 L = 0;
for (int32 i = 0; i < D; i++) for (int32 i = 0; i < D; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment