BorealisAI / private-data-generation

A toolbox for differentially private data generation
Other
129 stars 31 forks source link

RuntimeError: Sizes of tensors must match except in dimension 0. #4

Open juliecious opened 3 years ago

juliecious commented 3 years ago

Hi,

I got this error message when running pate-gan with the breast cancer dataset.

Traceback (most recent call last): File "evaluate.py", line 144, in <module> lap_scale=opt.lap_scale, class_ratios=class_ratios, lr=1e-4)) File "/content/private-data-generation/models/pate_gan.py", line 104, in train fake = self.generator(torch.cat([z.double(), category], dim=1)) RuntimeError: Sizes of tensors must match except in dimension 0. Got 45 and 64 (The offending index is 0)

I have made sure to drop all the nan values and the values in the dataset are continuous. Could you please shed some light on the issue?

Here's my code of running pate-gan

python evaluate.py --target-variable='target' \ --train-data-path=./data/breast_processed_train.csv \ --test-data-path=./data/breast_processed_test.csv \ --normalize-data pate-gan --enable-privacy \ --target-epsilon=1