Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed May 8, 2024
1 parent ee36857 commit 03154e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_rnn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int test_rnn_with_hidden(const ncnn::Mat& a, int outch, int direction)
weights[2] = RandomMat(outch * outch * num_directions);

// initial hidden state
ncnn::Mat hidden = RandomMat(outch, num_directions);
ncnn::Mat hidden = RandomMat(outch, num_directions, -1.f, 1.f);

std::vector<ncnn::Mat> as(2);
as[0] = a;
Expand Down Expand Up @@ -85,7 +85,7 @@ int test_rnn_with_hidden_input(const ncnn::Mat& a, int outch, int direction)
weights[2] = RandomMat(outch * outch * num_directions);

// initial hidden state
ncnn::Mat hidden = RandomMat(outch, num_directions);
ncnn::Mat hidden = RandomMat(outch, num_directions, -1.f, 1.f);

std::vector<ncnn::Mat> as(2);
as[0] = a;
Expand Down

0 comments on commit 03154e6

Please sign in to comment.