Confused about keras Dot Layer. How is the Dot product computed?
问题 I read all posts about the Dot Layer but none explains how this and so the output shape is computed! It seems so standard though! How exactly are the values computed with a along a specific axis? val = np.random.randint(2, size=(2, 3, 4)) a = K.variable(value=val) val2 = np.random.randint(2, size=(2, 2, 3)) b = K.variable(value=val) print("a") print(val) print("b") print(val2) out = Dot(axes = 2)([a,b]) print(out.shape) print("DOT") print(K.eval(out)) I get: a [[[0 1 1 1] [1 1 0 0] [0 0 1 1]]