import keras.backend as K import numpy as np x = K.variable(np.eye(2, 2)) print('shape:', K.shape(x)) print('int_shape:', K.int_shape(x))