Skip to content
Discussion options

You must be logged in to vote

it sounds like there's nothing spatial about the model you want to learn? i.e. the prediction for a given voxel should be independent of the features in the other voxels near to it?

if so then maybe PatchDataset is overkill and all you need to do is reshape to absorb the spatial dimension into the batch dimension

  • e.g. if you have a batch size of $B$ and each image consists of 6 feature maps in a $H\times W \times D$ image, then the shape might be $(B,6,H,W,D)$.
  • img.permute(0,2,3,4,1) will move the spatial dimensions to be adjacent to batch dimension giving you shape $(B,H,W,D,6)$
  • img.reshape(-1,6) will then absorb the spatial dimensions into the batch dimension, giving shape $(BHWD, 6)$

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ebrahimebrahim
Comment options

@aalhayali
Comment options

@ebrahimebrahim
Comment options

@aalhayali
Comment options

@ebrahimebrahim
Comment options

Answer selected by relyativist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants