precompute training data outside training script
This commit is contained in:
parent
78ece6996f
commit
c8c6ae03ac
2 changed files with 14 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,3 +2,4 @@
|
||||||
/__pycache__/
|
/__pycache__/
|
||||||
/data/
|
/data/
|
||||||
/music.safetensors
|
/music.safetensors
|
||||||
|
/data.npz
|
||||||
|
|
|
||||||
13
dataInit.py
Normal file
13
dataInit.py
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
import data
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
x,y = data.dataset(data.load())
|
||||||
|
size=len(x)
|
||||||
|
|
||||||
|
x_np = np.stack(x)
|
||||||
|
x_np = np.expand_dims(x_np, axis=1)
|
||||||
|
|
||||||
|
y_np = np.stack(y)
|
||||||
|
y_np = np.expand_dims(y_np, axis=1)
|
||||||
|
|
||||||
|
np.savez_compressed("data",x_np,y_np)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue