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

transfer() or tranfer() #50

Open
blackcement opened this issue Mar 1, 2020 · 0 comments
Open

transfer() or tranfer() #50

blackcement opened this issue Mar 1, 2020 · 0 comments

Comments

@blackcement
Copy link

Help me please. Can't figure it out right?

In one example, transfer ()
https://github.com/waylonflinn/weblas/wiki/Pipeline

in another tranfer ()
https://github.com/waylonflinn/weblas

Both options do not work

Uncaught TypeError: Cannot read property 'transfer' of undefined at weblas.html:20

<script type="text/javascript" src="./dist/weblas.js"></script>

<script>

var height_A = 52, width_A = 52,
    height_B = 52, width_B = 52;

var A = new Float32Array(height_A * width_A);
var B = new Float32Array(height_B * width_B);

	for (let k = 0; k < height_A*width_A; k++) 
	{
		A[k] =Math.random();
		B[k] =Math.random();
	}
	
var shape = [M, N]; // Строки столбцы
var t0 = weblas.pipeline.Tensor(shape, A);	
//var t1 = weblas.pipeline.sscal(1, 1, t0);

var result = t0.transfer();  // <<----<<----<<----<<----<<----
console.log('t0 = ', result);
	
var M = height_A,
    N = width_B,
    K = height_B; // must match width_A

var alpha = 1;
var beta = 1;
var C = new Float32Array(width_B)      // specialized for neural net bias calculation

//result = weblas.sgemm(M, N, K, alpha, A, B, beta, C);
//console.log(result);
</script>
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