From 088dde19c0bca34059b5ba10ba120320fb2af3a1 Mon Sep 17 00:00:00 2001 From: yangkang98 <419434164@qq.com> Date: Tue, 14 Jun 2022 20:26:41 +0800 Subject: [PATCH] minor fix --- .idea/.gitignore | 8 ++++ .idea/gansformer.iml | 12 +++++ .idea/inspectionProfiles/Project_Default.xml | 48 +++++++++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 +++ .idea/misc.xml | 4 ++ .idea/modules.xml | 8 ++++ .idea/vcs.xml | 6 +++ pytorch_version/training/training_loop.py | 2 +- 8 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/gansformer.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/gansformer.iml b/.idea/gansformer.iml new file mode 100644 index 0000000..8a05c6e --- /dev/null +++ b/.idea/gansformer.iml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..87f0706 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,48 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..2b7c733 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..67baa41 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pytorch_version/training/training_loop.py b/pytorch_version/training/training_loop.py index c7a30dc..4548ec4 100644 --- a/pytorch_version/training/training_loop.py +++ b/pytorch_version/training/training_loop.py @@ -55,7 +55,7 @@ def fetch_data(dataset, dataset_iter, input_shape, drange_net, device, batches_n real_c = real_c.to(device).split(batch_gpu) gen_zs = torch.randn([batches_num * batch_size, *input_shape[1:]], device = device) - gen_zs = [gen_zs.split(batch_gpu) for gen_z in gen_zs.split(batch_size)] + gen_zs = [gen_z.split(batch_gpu) for gen_z in gen_zs.split(batch_size)] gen_cs = [dataset.get_label(np.random.randint(len(dataset))) for _ in range(batches_num * batch_size)] gen_cs = torch.from_numpy(np.stack(gen_cs)).pin_memory().to(device)