-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Dimension size must be evenly divisible by 50 but is 1 for '{{node Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32]( #581
Comments
I get the same error (tfp 0.9, tf 2.15) with the DPKerasAdamOptimizer in a colab env (colab release 2024-09-23) More precisely: first installing ft privacy via
and running the code below will result in
Explicitly switching to an older tf version with:
and runnig the code below again I get the same error as @MaitriSavla2003 .
|
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,?].
The text was updated successfully, but these errors were encountered: