Код: Выделить всё
n = 100
c = 5
a = tf.constant(np.random.rand(n//10, c, c))
b = tf.constant(np.random.rand(n, c, c))
a_prime = tf.repeat(a, 10, 0)
result = a_prime @ b
Подробнее здесь: https://stackoverflow.com/questions/792 ... d-elements
Код: Выделить всё
n = 100
c = 5
a = tf.constant(np.random.rand(n//10, c, c))
b = tf.constant(np.random.rand(n, c, c))
a_prime = tf.repeat(a, 10, 0)
result = a_prime @ b