Skip to content

kernel_size as the default stride for avg_pool1d#744

Merged
soumith merged 1 commit intopytorch:masterfrom
supakjk:patch-1
Feb 15, 2017
Merged

kernel_size as the default stride for avg_pool1d#744
soumith merged 1 commit intopytorch:masterfrom
supakjk:patch-1

Conversation

@supakjk
Copy link
Contributor

@supakjk supakjk commented Feb 15, 2017

Following the documentation, let stride to be kernel_size if stride is not provided.

Following the documentation, let stride to be kernel_size if stride is not provided.
Copy link
Contributor

@apaszke apaszke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to add that (1,) tuple to both values. Wrap the if in parenthesis and add it later.

@soumith
Copy link
Collaborator

soumith commented Feb 15, 2017

@apaszke it's added to kernel_size above, so it doesn't need to be added again to stride on the else condition

@soumith soumith merged commit 336eeee into pytorch:master Feb 15, 2017
@soumith
Copy link
Collaborator

soumith commented Feb 15, 2017

thanks @supakjk

@supakjk supakjk deleted the patch-1 branch February 15, 2017 17:52
soumith pushed a commit to killeent/pytorch that referenced this pull request Apr 28, 2017
* move TopK to generic

* partial genericization of kernel code

* introduce TopKTypeConfig, specialize radix type and conversion for floats

* implement topk for byte tensor

* implement for char tensor

* implement for int tensor, extend test to check indices as well

* works for longs too

* make bitfield set/get a struct, add support for 64-bit types

* extend to double tensor

* implement for half tensor

* asserts; test fix
ashishfarmer pushed a commit to ashishfarmer/pytorch that referenced this pull request Oct 6, 2020
switch to atomicAdd for half datatype
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants