Comments (7)
And the tensor size of image_batch is [bs, 1, 224, 224]. But i don't know why the channel is 1.
from transunet.
Hello, thanks for your comments!
(1) The default channel in Synapse dataset is 1. But line 386-397 in vit_seg_modeling.py suggests:
if x.size()[1] == 1:
x = x.repeat(1,3,1,1)
So the code will automatically handle it.
(2) Line 74 you mentioned in trainer_synapse is used for visualization in tensorboard. Please remove it if you don't need it.
IndexError: index 1 is out of bounds for dimension 0 with size 1.
It suggests that the batch_size is 1 instead of >1. Please just simply print(len(image)) to see how many the batch_size is used during training.
Let me know if you have further questions. Thanks!
from transunet.
print(len(image))
hi, I have the same error during my training, my batch_size was set 16. when I print(len(image)), it was 1. how can I fix?? thanks
from transunet.
print(len(image))
hi, I have the same error during my training, my batch_size was set 16. when I print(len(image)), it was 1. how can I fix?? thanks
fixed by reducing some data, also adding more data can work.
from transunet.
print(len(image))
hi, I have the same error during my training, my batch_size was set 16. when I print(len(image)), it was 1. how can I fix?? thanks
fixed by reducing some data, also adding more data can work.
hello, I have the same question during my training. But I can't understand exactly what you mean "by reducing some data, also adding more data". Can you explain more details please ? thanks
from transunet.
print("{} {}".format(image_batch.type(), image_batch.size()))
image = image_batch[1, 0:1, :, :]
print(len(image))
The image_batch print torch.Size([6, 1, 224, 224]), and len(image) print 1 as @linyingyingkarina.
my settings of training: batch:6, image size: 224.
from transunet.
print(len(image))
hi, I have the same error during my training, my batch_size was set 16. when I print(len(image)), it was 1. how can I fix?? thanks
fixed by reducing some data, also adding more data can work.
Sorry, I didn't understand. Can you be more specific?
from transunet.
Related Issues (20)
- Different input size (width x height)
- Reason for [-125, 275] input clipping
- "ZeroDivisionError: integer division or modulo by zero" when vit_patches_size=8 HOT 3
- Need R50+ViT-B_16 rather than R50-ViT-B_16! HOT 1
- 当我在运行TransUNet-main的train.py时出现错误:KeyError: 'Transformer/encoderblock_0/Multi5HeadDotProductAttention_1/query/kernel is not a file in the archive' 这是在我进行KeyError: 'Transformer/encoderblock_0/MultiHeadDotProductAttention_1/query\\kernel is not a file in the archive'后的更改出现的错误,csdn说这是os.path.join 合并路径的时候出现的问题,更改后仍然出现以上错误 HOT 4
- Even if we fix the seed, the results change for each training. HOT 3
- asking for you help
- ACDC dataset 100 cases of data HOT 1
- Training for three-channel dataset
- Need R50+ViT-L_16 pretrained model rather than R50+ViT-L_32 HOT 1
- 导入包报错,文件夹重名导致的坑 HOT 2
- Data preprocessing HOT 2
- Training with different image size HOT 1
- Is the Synapse multi-organ segmentation dataset experimental result obtained from is the 20 samples official test set?
- change patch_size during test
- PreActBottleneck
- Training performance issues on small-sized targets
- The issue arises from the absence of the "lists_Synapse" folder.
- ACDC dataset HOT 1
- About the solution of problems like "have 3 channels, but got 1000 channels instead"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transunet.