Created
March 13, 2019 13:20
-
-
Save ChunML/0204d6adcd39ac583b7247342743f926 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for e in range(10): | |
accuracy = [] | |
for batch, (text, label) in enumerate(train_data.take(-1)): | |
with tf.GradientTape() as tape: | |
logits = model(text) | |
label = tf.expand_dims(label, 1) | |
loss = loss_func(label, logits) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ValueError Traceback (most recent call last)
in
3 for batch, (text, label) in enumerate(train_data.take(-1)):
4 with tf.GradientTape() as tape:
----> 5 logits = model(text)
6 label = tf.expand_dims(label, 1)
7 loss = loss_func(label, logits)
ValueError: Input 0 of layer bidirectional_1 is incompatible with the layer: expected ndim=3, found ndim=5. Full shape received: [1, 1, 1, 164, 64]
I have this error while running the code.Please Rectify..!!!