tfjs-npy | NumPy file parsing and serialization for TensorFlow.js | Parser library
kandi X-RAY | tfjs-npy Summary
kandi X-RAY | tfjs-npy Summary
NumPy file parsing and serialization for TensorFlow.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tfjs-npy
tfjs-npy Key Features
tfjs-npy Examples and Code Snippets
Community Discussions
Trending Discussions on tfjs-npy
QUESTION
I wonder if it is possible, to save and load tensors in tensorflow.js in order to avoid recalculating them for each batch? The problem is that my gpu is barely used because it has to wait for cpu transforming my array to tensor, before the training.
my worflow now looks like this:
- loading dataset(reading from hdd to array) (1-2 seconds)
2.cpu transforming array to tensor (takes a long time)
3.gpu trains (takes 1 second or less)
unloading / tidy (5 seconds, also a bit too long)
repeat
EDIT: Here is some code with the problematic(means long heavy computation) and unproblematic lines commented:
...ANSWER
Answered 2019-Feb-26 at 05:21The memory used by nodejs can be increased with the flag --max-old-space-size
as indicated here. There is neither an issue with nodejs
nor tensorflow.js
regarding that. The only problem might be the capacity of your memory. This might be the only reason for going forth and back to read your data.
Having said that, it is unclear what it is being done here:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tfjs-npy
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page