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)