Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestTensorString failed on macOS #192

Closed
wangkuiyi opened this issue Aug 24, 2020 · 1 comment
Closed

TestTensorString failed on macOS #192

wangkuiyi opened this issue Aug 24, 2020 · 1 comment

Comments

@wangkuiyi
Copy link
Owner

wangkuiyi commented Aug 24, 2020

I noticed the failure due to TravsiCI failed with #191. TravisCI is configured to run on macOS VM.

=== RUN   TestTensorString
    TestTensorString: tensor_test.go:84: 
        	Error Trace:	tensor_test.go:84
        	Error:      	Not equal: 
        	            	expected: " 1.0000  1.1000  1.2000\n 2.0000  3.0000  4.0000\n[ CPUFloatType{2,3} ]"
        	            	actual  : "   0.0141    2.0000  512.0001\n   0.0000    0.0000    0.0000\n[ CPUDoubleType{2,3} ]"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,3 +1,3 @@
        	            	- 1.0000  1.1000  1.2000
        	            	- 2.0000  3.0000  4.0000
        	            	-[ CPUFloatType{2,3} ]
        	            	+   0.0141    2.0000  512.0001
        	            	+   0.0000    0.0000    0.0000
        	            	+[ CPUDoubleType{2,3} ]
        	Test:       	TestTensorString
@wangkuiyi
Copy link
Owner Author

This is because I changed the type [2][3]float32 into [][]float32 before passing the variable to Tensor.FromBlob. The variable of Go array is like C array -- flattened array of elements; however, the memory layout of a slice of slices is a C array of reflect.SlideHeaders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant