diff --git a/libnd4j/include/graph/impl/GraphExecutioner.cpp b/libnd4j/include/graph/impl/GraphExecutioner.cpp index 38399242c..aeb8f61b5 100644 --- a/libnd4j/include/graph/impl/GraphExecutioner.cpp +++ b/libnd4j/include/graph/impl/GraphExecutioner.cpp @@ -837,9 +837,9 @@ uint8_t* readFlatBuffers(const char * filename) { int cnt = 0; int b = 0; while (cnt < fileLen) { - b += fread(data + cnt, 1, 1, in); + b = fread(data + cnt, 1, 16384, in); - cnt++; + cnt += b; } fclose(in);