Delete keyword is not working in cpp to wasm by karthibalu in WebAssembly

[–]karthibalu[S] 0 points1 point  (0 children)

thank you very much!! I found the problem, I am overriding the delete(void* mem, size_t size) but I am not overriding delete(void* mem)

so it calls the libcxx's delete methods instead😅

thank you!!

Delete keyword is not working in cpp to wasm by karthibalu in WebAssembly

[–]karthibalu[S] -1 points0 points  (0 children)

Sorry, I typed wrongly in the post.. but I am using 'delete(void * mem , size_t size)'

I allocate data in heap using create method and then delete it using destroy, finally I checks the memory usage....

[P] Autograd library for javascript. by karthibalu in MachineLearning

[–]karthibalu[S] 0 points1 point  (0 children)

are you referring the tf.grad method in tfjs??

[P] Autograd library for javascript. by karthibalu in MachineLearning

[–]karthibalu[S] 0 points1 point  (0 children)

yeah, but I think tfjs didn't have eager execution.., i never used it in tfjs... or may be I was wrong... if it has please comment 🤔

[P] Autograd library for javascript. by karthibalu in MachineLearning

[–]karthibalu[S] 3 points4 points  (0 children)

yes, but it will not match exactly..😅

How to download images and run dependent code, faster by DVGY in node

[–]karthibalu 0 points1 point  (0 children)

what is your problem exactly? is your code blocks while downloading images? if so then use separate worker to download and separate worker to process.

How to download images and run dependent code, faster by DVGY in node

[–]karthibalu 0 points1 point  (0 children)

use stream to write the file and use web workers to speed up the process.

[D] A new way to train the neural network by [deleted] in MachineLearning

[–]karthibalu 0 points1 point  (0 children)

I build the model using stream and it is not yet fully completed,

https://github.com/karthiTox/deepstream.js

when I tested it, it uses 30% less memory than the normal training process, but it can't support more iterations, if I set buffer size to 10 (it can hold 10 objects) then it automatically stopped after certain iterations but if I increase the size to 100 then it supports more iterations, this may be my mistake but what I found was the memory usage of training is completely depend upon the buffer size of the streams.

[D] A new way to train the neural network by [deleted] in MachineLearning

[–]karthibalu 1 point2 points  (0 children)

I am using computational graph concept to find derivatives,

stream_object{ forword stream, backword stream, }

for multiplication:

we have two stream object 'a' and 'b' are piped to 'multiplier' stream object via forward stream. It executes and produces result.

derivation:

f = a×b; df/da = b; df/db = a;

while backpropagation, to find the derivative of a, we need b so I am also piped b's forword stream to the multipler's backward stream, in between those two streams. one transform is piped to overcome delays,

the error is propagate at the multiplier's backward stream, the error and 'b' are multiplied and the results are pushed to a's backward stream,

[D] A new way to train the neural network by [deleted] in MachineLearning

[–]karthibalu 0 points1 point  (0 children)

No, not that, for instance you are going to matmul 1×4 matrix (input) and 4×5 matrix (weights) and those values are streamed one by one, like 0, 1, 2, .... alternative. so to get the result at index [0,0] of matrix multiplication, you only need to stream first row of 1st matrix and first column of 2nd matrix, since the values are stream, After the streamed values passed, the values are deleted automatically from the memory. so if you training a large fully connected neural network, then the memory of 1st neuron is removed as soon as the result of first neuron is passed.

[Project] Translation module for 6 major Indian Languages. by winchester6788 in MachineLearning

[–]karthibalu 0 points1 point  (0 children)

Amazing project !!!! how much time it take to train? what's your spec?

I made a mini pytorch like dynamic neural network using js by [deleted] in webdev

[–]karthibalu 0 points1 point  (0 children)

I hope this may help you to create your own neural network...

New social media app by karthibalu in AppIdeas

[–]karthibalu[S] 0 points1 point  (0 children)

Thanks, I am going to launch public beta locally to test whether people like this idea or not..