# Conv3D size doesn't make sense with NIFTI data?

**URL:** <https://discuss.pytorch.org/t/conv3d-size-doesnt-make-sense-with-nifti-data/84555>\
**Category:** Uncategorized\
**Created:** [June 7, 2020, 6:51pm UTC](https://discuss.pytorch.org/t/conv3d-size-doesnt-make-sense-with-nifti-data/84555 "2020-06-07T18:51:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![olisp](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/o/e79b87/32.png) [@olisp](https://discuss.pytorch.org/u/olisp)\
**Post date:** [June 7, 2020, 6:51pm UTC](https://discuss.pytorch.org/t/conv3d-size-doesnt-make-sense-with-nifti-data/84555/1 "2020-06-07T18:51:37Z")

</div>

Hello,

So I am writing custom dataset for medical images, with .nii (NIFTI1 format), but there is a confusion.

My dataloader returns the shape ` torch.Size (1,1,256,256,51)` . But NIFTI volumes use anatomical axes, different coordinate system, so it doesn’t make any sense to permute the axes, which I normally would with volume made of 2D images seprately stored in local drive with 51 slice images (or depth), as Conv3D follows the convention (N,C,D,H,W).

so ` torch.Size (1,1,256,256,51)` (ordinarily 51 would be the depth) doesn’t follow the convention (N,C,D,H,W) , but I should not permute the axes as the data uses entirely different coordinate system ?

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [June 8, 2020, 8:07am UTC](https://discuss.pytorch.org/t/conv3d-size-doesnt-make-sense-with-nifti-data/84555/2 "2020-06-08T08:07:40Z")

</div>

> [@olisp](#):
>
> but I should not permute the axes as the data uses entirely different coordinate system ?

Could you explain this statement a bit?  
Does the depth dimension represent the number of slices or what do you mean by “different coordinate system”?  
What wouldn’t it be possible to permute the data?
