Comments (5)
The data preprocessing stage has nothing to do with GPU memory yet. You may want to change the parameter of number of threads in step 2 according to your CPU specification (mine is 20).
from tdstf.
Thanks for the reply. I changed 20 to 14、8、2,still stucked, the memory usage is 100%【63.7/63.7g】,but no error reported.
I don't know the reason, is it about the pkl file too large?😟
from tdstf.
Yes, and then you would need to change the code for all data to be processed segment by segment, in order to keep the memory from exploding.
from tdstf.
def forecast(self, samples_x, samples_y, info, n_samples): generation = torch.zeros(n_samples, samples_y.shape[0], samples_y.shape[-1]).to(self.device) for i in range(n_samples): samples_y[:, 2] = torch.randn_like(samples_y[:, 2]) * samples_y[:, 3] #mask for t in range(self.num_steps - 1, -1, -1): mask_x = samples_x[:, 3] mask_y = samples_y[:, 3] samples_x[:, 0] = torch.where(mask_x == 1, samples_x[:, 0], self.lv) samples_x[:, 1] = torch.where(mask_x == 1, samples_x[:, 1], -1) samples_y[:, 0] = torch.where(mask_y == 1, samples_y[:, 0], self.lv) samples_y[:, 1] = torch.where(mask_y == 1, samples_y[:, 1], -1) predicted = self.res_model(samples_x, samples_y, info, torch.tensor([t]).to(self.device)) coeff1 = 1 / self.alpha_hat[t] ** 0.5 coeff2 = (1 - self.alpha_hat[t]) / (1 - self.alpha[t]) ** 0.5 samples_y[:, 2] = coeff1 * (samples_y[:, 2] - coeff2 * predicted) * samples_y[:, 3] if t > 0: noise = torch.randn_like(samples_y[:, 2]) * samples_y[:, 3] sigma = ((1.0 - self.alpha[t - 1]) / (1.0 - self.alpha[t]) * self.beta[t]) ** 0.5 samples_y[:, 2] += sigma * noise generation[i] = samples_y[:, 2].detach()
Normalized predicted data are stored in generation[], how can I denormaliza the data to get the real results ?👀
HR、SBP and DBP, 3 target features are all included in the generation[]?, thier mean and std are diffrent with each other..
(;′⌒`)
from tdstf.
real value = prediction * std + mean, where std and mean come from training set.
from tdstf.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tdstf.