Rate this Page

torch.fx.experimental.graph_gradual_typechecker.expand_to_tensor_dim#

torch.fx.experimental.graph_gradual_typechecker.expand_to_tensor_dim(t, n)[source]#

Expand a type to the desired tensor dimension if possible Raise an error otherwise. - t is the given type - n is a number of dimensions to expand to