You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the output of keras.backend.batch_dot function is different from the tensorflow.keras.backend.batch_dot. The tensorflow version is 1.14.0, and the Keras version is 2.2.5
#using Google Colab
import tensorflow as tf #1.14.0 #v1.14.0-0-g87989f6959
from keras import backend as K #2.2.5
c = tf.ones(shape=(1,2,1))
h = tf.ones(shape=(1,2,1,16))
p1 = K.batch_dot(c, h, [2, 2])
print(K.int_shape(p1))
####output: (1,2,2,16)
p2 = tf.keras.backend.batch_dot(c, h, [2, 2])
print(p2.shape)
####output: (1,2,16)
However, in Keras version 2.2.4, these two functions produce identical results. So I think it might have some problem. Also, I wonder which result is actually correct?
#using localhost Jupyter
import tensorflow as tf
from keras import backend as K #2.2.4
c = tf.ones(shape=(1,2,1))
h = tf.ones(shape=(1,2,1,16))
p3 = K.batch_dot(c, h, [2, 2])
print(K.int_shape(p3))
####ourput: (1,2,16)
p4 = tf.keras.backend.batch_dot(c, h, [2, 2])
print(p4.shape)
####output: (1,2,16)
The text was updated successfully, but these errors were encountered:
I found that the output of
keras.backend.batch_dot
function is different from thetensorflow.keras.backend.batch_dot
. The tensorflow version is 1.14.0, and the Keras version is 2.2.5However, in Keras version 2.2.4, these two functions produce identical results. So I think it might have some problem. Also, I wonder which result is actually correct?
The text was updated successfully, but these errors were encountered: