interpret

This commit is contained in:
Francesco Gatti
2017-08-22 01:32:59 -07:00
parent 5a52de17eb
commit 5595b8037b
8 changed files with 106 additions and 60 deletions
+2 -1
View File
@@ -86,7 +86,8 @@ int checkResult(int size, dnnType *data_d, dnnType *correct_d, bool device) {
int diffs = 0;
for(int i=0; i<size; i++) {
if(fabs(data_h[i] - correct_h[i]) > eps) {
if(data_h[i] != data_h[i] && correct_h[i] != correct_h[i] && //nan control
fabs(data_h[i] - correct_h[i]) > eps) {
diffs += 1;
if(diffs == 1)
std::cout<<"\n";