Project-MONAI / Project-MONAI/MONAI

How to obtain the intermediate features (bottleneck features) in the downsampling stage of U-Net?

Open
#8,253 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

intermediate_outputs = {}
def forward_hook(layer_name):
def hook(module, input, output):
intermediate_outputs[layer_name] = output

return hook

input = torch.randn(4,1,64,64,64)
net.model[?].register_forward_hook(forward_hook("XXX"))

How should this be set?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue mentions a U-Net instance through net.model[?] and a forward hook that stores intermediate_outputs. Start by inspecting the model structure and its downsampling modules to determine which entry point corresponds to the requested bottleneck features. Done means providing a confirmed module path or documented way to obtain those outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.