hilab-git / dag4mia Goto Github PK
View Code? Open in Web Editor NEWDomain Adaptation and Generalization for Medical Image Analysis
License: MIT License
Domain Adaptation and Generalization for Medical Image Analysis
License: MIT License
During the training process, the consistency loss is getting bigger and bigger, and the other losses are getting smaller and smaller. Is it normal? Is it what we expect?
consistency_loss = 0
consistency_weight = get_current_consistency_weight(iter_num//len(loader_train_s), max_epoch)
consistency_dist = consistency_criterion(predout_t[train_params['labeled_bs']:], ema_output) #(batch, 3, 256, 256)
consistency_dist = torch.mean(consistency_dist)
consistency_loss = consistency_dist * consistency_weight
🐱👤
hello, First of all, thank you very much for opening up the source code, but I found a problem in your code
line 64 code: up_4 = self.up4(conv4, center, domain_label)
but up4 code in line 130: def forward(self, down_outputs, domain_label): only has 3 position, up4(conv4, center, domain_label) + self has 4 postion, not match
raise IndexError('index {} is out of range'.format(idx))
IndexError: index 1 is out of range
出现问题的地方实在container.py中:
def _get_abs_string_index(self, idx):
"""Get the absolute index for the list of modules"""
idx = operator.index(idx)
print(idx)
if not (-len(self) <= idx < len(self)):#这里
raise IndexError('index {} is out of range'.format(idx))
if idx < 0:
idx += len(self)
return str(idx)
跪求大佬上传sdnet 如果不方便 麻烦私发[email protected]
from models.networks.sdnet import MEncoder, AEncoder, Segmentor, Ada_Decoder
这个无法导入,请问作者这个sdnet您能上传一下吗。谢谢!
作者你好,这个怎么处理这个数据集啊?
could you share the code?
Hi, could you release the most important part sdnet.py?
你好,这个是缺少一个文件吧?
“from models.networks.sdnet import MEncoder, AEncoder, Segmentor, Ada_Decoder
ModuleNotFoundError: No module named 'models.networks.sdnet' ”
train_cddsa.py
we find no ramps.py in utils, so i have question about how can get this part of ramps
报错内容:
Traceback (most recent call last):
File "/home/compare/train_3d_DAG4MIA.py", line 295, in
seg_pred_t, high_r_t_tb = model(img_t, domain_label=1)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 171, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 181, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/parallel/parallel_apply.py", line 89, in parallel_apply
output.reraise()
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/_utils.py", line 644, in reraise
raise exception
IndexError: Caught IndexError in replica 0 on device 0.
Original Traceback (most recent call last):
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/parallel/parallel_apply.py", line 64, in _worker
output = module(*input, **kwargs)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/compare/models/networks/cscada_net.py", line 62, in forward
conv1 = self.conv1(x, domain_label)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/compare/models/networks/cscada_net.py", line 106, in forward
x = self.bn(x, domain_label)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/compare/models/layers/dsbn.py", line 28, in forward
bn = self.bns[domain_label]
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/container.py", line 295, in getitem
return self._modules[self._get_abs_string_index(idx)]
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/container.py", line 285, in _get_abs_string_index
raise IndexError('index {} is out of range'.format(idx))
IndexError: index 1 is out of range
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.