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