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.
@josevalim I fixed the problems with the tests and now they are all passing. It was basically a problem with passing data directly into the C API at the time of tensor creation. Tensorflow (even though this is not mentioned in the Tensorflow documentation) was overwriting whatever data was being passed to it for the TF_NewTensor function, (but only after a couple of operations so it wasn't immediately apparent), so the fix was creating a deep copy of the data as an internal variable and then passing that to TF_NewTensor instead of the original data in some functions.
I've tested this extensively now and there are no failures. Also added more tests for image loading.
I have completed the tensor to matrix conversion code as well, but I'll add that as a separate PR right now. I'll be adding more tests for the new functionalities in that PR.