sun-1024 / da-transunet Goto Github PK
View Code? Open in Web Editor NEWDA-TransUNet: Combining Dual Attention of Position and Channel with Transformer U-net for Medical Image Segmentation
License: GNU General Public License v3.0
DA-TransUNet: Combining Dual Attention of Position and Channel with Transformer U-net for Medical Image Segmentation
License: GNU General Public License v3.0
I am currently encountering an issue in my code and am seeking your expertise for guidance.
Error Message:
Traceback (most recent call last):
File "train.py", line 184, in
net.load_from(weights=np.load(config_vit.pretrained_path))
File "A:\DP_learn\DA-TransUnet-main\DA-TransUNet\DA-TransUNet\Architecture\DATransUNet.py", line 459, in load_from
unit.load_from(weights, n_block=uname)
File "A:\DP_learn\DA-TransUnet-main\DA-TransUNet\DA-TransUNet\Architecture\DATransUNet.py", line 209, in load_from
query_weight = np2th(weights[pjoin(ROOT, ATTENTION_Q, "kernel")]).view(self.hidden_size, self.hidden_size).t()
File "C:\Users\Wayne.conda\envs\DA\lib\site-packages\numpy\lib\npyio.py", line 260, in getitem
raise KeyError("%s is not a file in the archive" % key)
KeyError: 'Transformer/encoderblock_0\MultiHeadDotProductAttention_1/query\kernel is not a file in the archive'
I have checked the paths and files, but I am still unable to resolve the issue. I am uncertain whether the 'Transformer/encoderblock_0\MultiHeadDotProductAttention_1/query\kernel' path is correct or if there is a missing file.
感谢您论文做出的工作,运行train文件会报错
File "/root/data1/DA-TransUNet/datasets/dataset_synapse.py", line 39, in call
x,y= image.shape
ValueError: too many values to unpack (expected 2)
请问该如何修改呢
请问,配置好环境后遇到的第一个错误是:receptive_field_size = tensor[0][0].numel()
IndexError: index 0 is out of bounds for dimension 0 with size 0。大家都是怎么解决的呀?
作者您好,请问代码什么时候完全上传啊
菜鸟一枚,
KeyError: 'Transformer/encoderblock_0\MultiHeadDotProductAttention_1/query\kernel is not a file in the archive'
请问一下,你的代码有没有tensorflow版本的?
代码 snapshot = os.path.join(snapshot_path, 'best_model.pth')
if not os.path.exists(snapshot): snapshot = snapshot.replace('best_model', 'epoch_'+str(args.max_epochs-1))
报错:C:\ProgramData\anaconda3\python.exe C:\Users\86133\Desktop\project_TransUNet\TransUNet\test.py
../model/TU_Synapse224/TU_pretrain_R50-ViT-B_16_skip3_epo150_bs24_224\epoch_149.pth
Traceback (most recent call last):
File "C:\Users\86133\Desktop\project_TransUNet\TransUNet\test.py", line 139, in
net.load_state_dict(torch.load(snapshot))
File "C:\Users\86133\AppData\Roaming\Python\Python311\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for VisionTransformer:
Missing key(s) in state_dict: "transformer.embeddings.hybrid_model.body.block1/.unit1/.gn1.weight", "
Unexpected key(s) in state_dict: "transformer.embeddings.DAblock1.conv5a.0.weight",
Thanks for your great work, I failed to use DDP to train the model, can you help me
RuntimeError: output with shape [0, 4, 1, 1] doesn't match the broadcast shape [0, 4, 1, 0]
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.