Skip to content

swin_unetr_btcv_segmentation #1204

Answered by KumoLiu
katy070222 asked this question in Q&A
Feb 2, 2023 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

Hi @katy070222, if you want to change the output channel, you could do something like this:

import torch
from monai.networks.nets import SwinUNETR

model = SwinUNETR(
    img_size=(96, 96, 96),
    in_channels=1,
    out_channels=2,
    feature_size=48,
    use_checkpoint=True,
)

img = torch.rand(1, 1,96,96,96)
out = model(img)

Hope it can help you, thanks!

Replies: 1 comment 6 replies

Comment options

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

@KumoLiu
Comment options

@katy070222
Comment options

@KumoLiu
Comment options

@katy070222
Comment options

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