Skip to content

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

@juliecious

Description

@juliecious

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions