Created
April 4, 2022 21:46
-
-
Save cobanov/93d4a987df564c232eb1511b8e82e128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import os | |
path = '' | |
files = os.listdir(path) | |
data = np.zeros((1, 128)) | |
identifiers = np.full((data.shape[0]), 0) | |
for file in files: | |
temp = np.load(path+file) | |
data = np.concatenate((data, temp), axis=0) | |
identifiers = np.append(identifiers, np.full((temp.shape[0]), int(file.split('.')[0][-3:]) )) | |
print('Done', file, data.shape[0]) | |
np.savez('merged_embeddings.npz', filelist=identifiers, features=data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment