Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Flatten.forward() [10 points] #5

Open
chris-dare opened this issue Oct 10, 2020 · 0 comments
Open

Implement Flatten.forward() [10 points] #5

chris-dare opened this issue Oct 10, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@chris-dare
Copy link
Owner

In nn/conv.py, complete Flatten.forward(). Note that this is in the conv.py file, not in functional.py.

This layer is often used between Conv and Linear layers, in order to squish the high-dim convolutional outputs into a lower-dim shape for the linear layer. For more info, see the torch documentation and the example we provided in the code comments.

Hint: This can be done in one line of code, with no new operations or (horrible, evil) broadcasting needed.

Bigger Hint: Flattening is a subcase of reshaping. np.prod() may be useful.

@chris-dare chris-dare added the enhancement New feature or request label Oct 10, 2020
@chris-dare chris-dare added this to the Implement conv1d milestone Oct 10, 2020
@chris-dare chris-dare self-assigned this Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant