Commit a4c5983a authored by Davis King's avatar Davis King

Improved softmax tests

parent 0a832e42
...@@ -114,10 +114,12 @@ namespace ...@@ -114,10 +114,12 @@ namespace
void test_softmax() void test_softmax()
{ {
print_spinner(); print_spinner();
resizable_tensor src(5,5), dest(5,5), gradient_input(5,5); const long nr = 3;
src = matrix_cast<float>(gaussian_randm(5,5, 0)); const long nc = 3;
dest = matrix_cast<float>(gaussian_randm(5,5, 1)); resizable_tensor src(5,5,nr,nr), dest(5,5,nr,nc), gradient_input(5,5,nr,nc);
gradient_input = matrix_cast<float>(gaussian_randm(5,5, 2)); src = matrix_cast<float>(gaussian_randm(5,5*nr*nc, 0));
dest = matrix_cast<float>(gaussian_randm(5,5*nr*nc, 1));
gradient_input = matrix_cast<float>(gaussian_randm(5,5*nr*nc, 2));
......
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