Search code examples
pythonluakerasconv-neural-networktorch

Keras function like View in Torch


I am working on converting some code in Torch and lua to Keras and python. Is there a function in Keras that works like View in Torch? EDIT: I want to use the function to convert the output from a convolutional layer to proper shape as a input to a fully connected layer.


Solution

  • I actually got the answer. I can use Reshape. However, for my case I am using Flatten to "flatten" the the shape before passing to a fully connected layer.