Reserve a data! O Google I / O retorna de 18 a 20 de maio Registre-se agora


TensorFlow 1 version View source on GitHub

Computes the shape of a broadcast given known shapes.

When shape_x and shape_y are fully known TensorShapes this computes a TensorShape which is the shape of the result of a broadcasting op applied in tensors of shapes shape_x and shape_y.

For example, if shape_x is [1, 2, 3] and shape_y is [5, 1, 3], the result is a TensorShape whose value is [5, 2, 3].

This is useful when validating the result of a broadcasting operation when the tensors have statically known shapes.

shape_x A TensorShape
shape_y A TensorShape

A TensorShape representing the broadcasted shape.

ValueError If the two shapes can not be broadcasted.