Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It seems that with realistic weights and biases, the DIANA digital accelerator gives different results compared to simulation on x86. This can already be proven through executing a single conv2d layer. This issue was not yet discovered since we were testing with very large random biases. Due to their size, small mistakes in the convolution result itself were covered and not reveald earlier. This issue was discovered by testing with realistic trained weights and biases. In the latter case, the biases were much smaller and differences in computed results between x86 and DIANA were uncovered.
This PR starts with adding a new test case
test_conv2d_reproduce_bug
in test.py to reproduce the problem. The test case sets the random generated biases to zero and runs 3 tests with different kernel sizes (1, 3 and 5).The cause of this problem is not yet discovered and needs investigation.
Two other modifications were made to fix the other test cases when running on diana:
g_
). This is unwanted in some cases so now we work with a copy of that dict in create_demo_file().