tensorflow / tensorflow/privacy
ValueError: Dimension size must be evenly divisible by 50 but is 1 for '{{node Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32](
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 477
- Avg merge
- 22h 12m
- Merged PRs (30d)
- 1
Description
I am trying to integrate Differential Privacy in my code, but the code is working fine only when I am using microbatch size as 1, other than that it is throwing the error. I even tried keeping it equal to the batch size. But the error is still not resolved.
EXACT ERROR:
ValueError: Dimension size must be evenly divisible by 50 but is 1 for '{{node Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32](sparse_categorical_crossentropy/weighted_loss/value, Reshape/shape)' with input shapes: [], [2] and with input tensors computed as partial shapes: input[1] = [50,?].
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported ValueError from the Differential Privacy integration, comparing the working microbatch size of 1 with larger values and checking the batch-size configuration. Trace the reported Reshape and weighted-loss operations to identify which dimension is expected to be divisible by 50. Done means the integration works with the intended microbatch size without the reshape error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100