def _to_dense(self):
    product = self.operators[0].to_dense()
    for operator in self.operators[1:]:
        product = product[..., :, array_ops.newaxis, :, array_ops.newaxis]
        op_to_mul = operator.to_dense()[..., array_ops.newaxis, :, array_ops.newaxis, :]
        product *= op_to_mul
        product = array_ops.reshape(product, shape=array_ops.concat([array_ops.shape(product)[:(- 4)], [(array_ops.shape(product)[(- 4)] * array_ops.shape(product)[(- 3)]), (array_ops.shape(product)[(- 2)] * array_ops.shape(product)[(- 1)])]], axis=0))
    product.set_shape(self.shape)
    return product
def _to_dense(self):
    product = self.operators[0].to_dense()
    for operator in self.operators[1:]:
        product = product[..., :, array_ops.newaxis, :, array_ops.newaxis]
        op_to_mul = operator.to_dense()[..., array_ops.newaxis, :, array_ops.newaxis, :]
        product *= op_to_mul
        product = array_ops.reshape(product, shape=array_ops.concat([array_ops.shape(product)[:(- 4)], [(array_ops.shape(product)[(- 4)] * array_ops.shape(product)[(- 3)]), (array_ops.shape(product)[(- 2)] * array_ops.shape(product)[(- 1)])]], axis=0))
    product.set_shape(self.shape)
    return product