What is the equivalent of the options start_dim and end_dim of the flatten PyTorch layers, in Tensorflow?
With Tensorlfow we only have data_format and it is not customizable.
What is the equivalent of the options start_dim and end_dim of the flatten PyTorch layers, in Tensorflow?
With Tensorlfow we only have data_format and it is not customizable.
I don't think there is an identical implementation in tf. However, you can always use tf.reshape and add the shape yourself with a simple function which takes as arguments input, start_dim and end_dim and outputs the corresponding output shape that torch.flatten would give you.