Update test_v2.0/fake_compression_submission/create_fake_submission.py
Browse files
test_v2.0/fake_compression_submission/create_fake_submission.py
CHANGED
@@ -8,7 +8,7 @@ import shutil
|
|
8 |
def generate_fake_submission(num_samples=450, shape=(3, 32, 32), k=500):
|
9 |
"""
|
10 |
Creates a 'submission.zip' with 500 .npz files + README.txt.
|
11 |
-
Each file has 'indices' and 'values' shaped (T,H,W,
|
12 |
"""
|
13 |
|
14 |
submission_dir = "temp_submission"
|
@@ -28,7 +28,7 @@ def generate_fake_submission(num_samples=450, shape=(3, 32, 32), k=500):
|
|
28 |
with open(os.path.join(submission_dir, "README.txt"), "w") as f:
|
29 |
f.write(readme_content)
|
30 |
|
31 |
-
# 2) For each of the 500 samples, create random (T,H,W,
|
32 |
for sample_id in range(num_samples):
|
33 |
topk_indices = np.random.randint(0, 64000, size=(shape[0], shape[1], shape[2], k), dtype=np.int32)
|
34 |
topk_values = np.random.randn(shape[0], shape[1], shape[2], k).astype(np.float32)
|
|
|
8 |
def generate_fake_submission(num_samples=450, shape=(3, 32, 32), k=500):
|
9 |
"""
|
10 |
Creates a 'submission.zip' with 500 .npz files + README.txt.
|
11 |
+
Each file has 'indices' and 'values' shaped (T,H,W,500)
|
12 |
"""
|
13 |
|
14 |
submission_dir = "temp_submission"
|
|
|
28 |
with open(os.path.join(submission_dir, "README.txt"), "w") as f:
|
29 |
f.write(readme_content)
|
30 |
|
31 |
+
# 2) For each of the 500 samples, create random (T,H,W,500) arrays
|
32 |
for sample_id in range(num_samples):
|
33 |
topk_indices = np.random.randint(0, 64000, size=(shape[0], shape[1], shape[2], k), dtype=np.int32)
|
34 |
topk_values = np.random.randn(shape[0], shape[1], shape[2], k).astype(np.float32)
|