def _shape(self):
    domain_dimension = self.operators[0].domain_dimension
    for operator in self.operators[1:]:
        domain_dimension *= operator.domain_dimension
    range_dimension = self.operators[0].range_dimension
    for operator in self.operators[1:]:
        range_dimension *= operator.range_dimension
    matrix_shape = tensor_shape.TensorShape([range_dimension, domain_dimension])
    batch_shape = self.operators[0].batch_shape
    for operator in self.operators[1:]:
        batch_shape = common_shapes.broadcast_shape(batch_shape, operator.batch_shape)
    return batch_shape.concatenate(matrix_shape)
def _shape(self):
    domain_dimension = self.operators[0].domain_dimension
    for operator in self.operators[1:]:
        domain_dimension *= operator.domain_dimension
    range_dimension = self.operators[0].range_dimension
    for operator in self.operators[1:]:
        range_dimension *= operator.range_dimension
    matrix_shape = tensor_shape.TensorShape([range_dimension, domain_dimension])
    batch_shape = self.operators[0].batch_shape
    for operator in self.operators[1:]:
        batch_shape = common_shapes.broadcast_shape(batch_shape, operator.batch_shape)
    return batch_shape.concatenate(matrix_shape)