Myosotis-Researches 0.0.19__py3-none-any.whl → 0.0.21__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,7 +79,7 @@ def train_ccgan(kernel_sigma, kappa, train_images, train_labels, netG, netD, net
79
79
  # printed images with labels between the 5-th quantile and 95-th quantile of training labels
80
80
  n_row=10; n_col = 1
81
81
  z_fixed = torch.randn(n_row*n_col, dim_gan, dtype=torch.float).cuda()
82
- selected_labels = np.array([0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])
82
+ selected_labels = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
83
83
 
84
84
  y_fixed = np.zeros(n_row*n_col)
85
85
  for i in range(n_row):
@@ -0,0 +1,43 @@
1
+ import gdown
2
+ from importlib import resources
3
+ import os
4
+ import rarfile
5
+
6
+ # Paths
7
+ datasets_dir = resources.files("myosotis_researches").joinpath("CcGAN", "datasets")
8
+
9
+ # File ID dictionary
10
+ file_id_dict = {
11
+ "Ra": "1DJfpvXTX1x6Ldf4nZzqzlVsQSx9iXo9I",
12
+ "MNIST": "1ZmTSX_wl68nsQI0ImfhpIsPClW_QrK1T",
13
+ }
14
+
15
+
16
+ # Function
17
+ def install_datasets(datasets_name):
18
+
19
+ # Path
20
+ zipped_dataset_path = os.path.join(datasets_dir, f"{datasets_name}_datasets.rar")
21
+
22
+ # File ID
23
+ file_id = file_id_dict[datasets_name]
24
+
25
+ # URL
26
+ url = f"https://drive.google.com/uc?id={file_id}"
27
+
28
+ # Download
29
+ gdown.download(url, zipped_dataset_path, quiet=False, use_cookies=False)
30
+
31
+ # Unzip
32
+ with rarfile.RarFile(zipped_dataset_path) as rf:
33
+ if rf.needs_password():
34
+ unzip_password = input("Password: ")
35
+ rf.extractall(path=datasets_dir, pwd=unzip_password)
36
+ else:
37
+ rf.extractall(path=datasets_dir)
38
+
39
+ # Delete zipped datasets
40
+ os.remove(zipped_dataset_path)
41
+
42
+
43
+ __all__ = ["install_datasets"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Myosotis-Researches
3
- Version: 0.0.19
3
+ Version: 0.0.21
4
4
  Summary: A repository for storing my progress of researches.
5
5
  Home-page: https://github.com/Zeyu-Xie/Myosotis-Researches
6
6
  Author: Zeyu Xie
@@ -35,7 +35,7 @@ myosotis_researches/CcGAN/train_128_output_10/opts.py,sha256=oIScD7A6GdcWI_ptB-k
35
35
  myosotis_researches/CcGAN/train_128_output_10/pretrain_AE.py,sha256=VAbe5kSfvTl2k0aV6eV3XnMMV28KrIzB2EglahXEXiU,10746
36
36
  myosotis_researches/CcGAN/train_128_output_10/pretrain_CNN_class.py,sha256=tnGH5rKeJyWY29esBXlFJx9Qr30uB6W5cMw1Wge-Leg,9247
37
37
  myosotis_researches/CcGAN/train_128_output_10/pretrain_CNN_regre.py,sha256=RSmHQ5Z3Jbq2TKU2D2p-HJriXxKDw4YG-B8gstwefcI,8953
38
- myosotis_researches/CcGAN/train_128_output_10/train_ccgan.py,sha256=ZykhfbmRFCUpP9JAFjIaO4B3nSLl6-KeQTqCa1WJltY,13335
38
+ myosotis_researches/CcGAN/train_128_output_10/train_ccgan.py,sha256=rS69zzfMgQElSr42vF6nK0sH9vfYS7lLCJzSbAm_rGI,13317
39
39
  myosotis_researches/CcGAN/train_128_output_10/train_cgan.py,sha256=bYJbBskTpESfCG2uj52RW9zLh3Zod4e8Uop7rim3dmE,9698
40
40
  myosotis_researches/CcGAN/train_128_output_10/train_cgan_concat.py,sha256=PYctY3IZiHGh4TshXx3mUZBf9su_8NuV_D8InkxKQZ4,8940
41
41
  myosotis_researches/CcGAN/train_128_output_10/train_net_for_label_embed.py,sha256=4j6r4_o4rXgAN4MdUQL-TXqZJpbhH7d9gWQR8YzBlXw,6976
@@ -43,10 +43,11 @@ myosotis_researches/CcGAN/train_128_output_10/utils.py,sha256=B-V6ct4WDisVVCOLO0
43
43
  myosotis_researches/CcGAN/utils/__init__.py,sha256=Pu9COV4zcXHGXuczhObersyeshVChmlEtwqp8VLUDxw,300
44
44
  myosotis_researches/CcGAN/utils/concat_image_horizontal.py,sha256=e6WsfO9IiSoP8zkZNz7IGimPUASr9VvyJUJdF-d40iw,954
45
45
  myosotis_researches/CcGAN/utils/concat_image_vertical.py,sha256=97-SuE8ZWpaeBm_ed6MAEaUOvtpzlYq_X3yWt4OEUTY,951
46
+ myosotis_researches/CcGAN/utils/install_datasets.py,sha256=V0Wd3ZZch_xB4XOEtvHS4afYPo7Xd8Js4I003R3V3hY,1033
46
47
  myosotis_researches/CcGAN/utils/make_h5.py,sha256=Q5OW1JA35ormmsrlAJp6XdC6x0uJBRNjsE31wM3zBiI,1422
47
48
  myosotis_researches/CcGAN/utils/print_hdf5_structure.py,sha256=leaR8H3GhlX6EuIXDMh36xG2zBdV-XlJkaXBuoorl6I,320
48
- myosotis_researches-0.0.19.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
49
- myosotis_researches-0.0.19.dist-info/METADATA,sha256=o-O5s4Ir9KGNpduL-hYtSFywxpc_j9RfB5i6MLVe2uw,765
50
- myosotis_researches-0.0.19.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
51
- myosotis_researches-0.0.19.dist-info/top_level.txt,sha256=zxAiMn5eyZNJM28MewTAkgi_RZJMbfWbzVR-KF0LdZE,20
52
- myosotis_researches-0.0.19.dist-info/RECORD,,
49
+ myosotis_researches-0.0.21.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
50
+ myosotis_researches-0.0.21.dist-info/METADATA,sha256=h0HhhIcRU51Y07g-lPAQCADiAo9604WYQ3cPIRlBSQc,765
51
+ myosotis_researches-0.0.21.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
52
+ myosotis_researches-0.0.21.dist-info/top_level.txt,sha256=zxAiMn5eyZNJM28MewTAkgi_RZJMbfWbzVR-KF0LdZE,20
53
+ myosotis_researches-0.0.21.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.0)
2
+ Generator: setuptools (80.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5