-
Notifications
You must be signed in to change notification settings - Fork 24.1k
view() after transpose() raises non contiguous error #764
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
Comments
Yes, this is expected, as |
Thank you for the quick response. It fixes my problem! |
@fmassa is there any good reason to add contiguous() into transpose function be default? |
@ducha-aiki it is much more efficient to have non-contiguous tensors, as you only need to perform a swap in the sizes/strides, instead of copying the whole memory of the tensor. |
…rch#764) Predicate inside blockBroadcast rather than enclosing it with a predicate if clause.
* update install_miopen.sh for rocm 4.2 * update manywheel/build_all_docker.sh for rocm 4.2 * add rocm4.2 to update_s3_htmls.sh * fix copy/paste error for rocm in manywheel/build_all_docker.sh * add rocm 4.2 to build-manywheel-images.yml action
* Add basic setup for precommit * Update README.md with instructions on installing precommit hooks --------- Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com> Co-authored-by: Bartlomiej Wroblewski <bwroblewski10@gmail.com>
I'm running below code, and got error below.
Commenting out
y = y.transpose(0, 1)
ends up without error.Is this something expected?
In actual, I'm using
.transpose()
and.view()
to usecross_entropy
for(n_batch, channel, height, width)
tensor by reshaping it to(n_batch * height * width, channel)
The text was updated successfully, but these errors were encountered: