Closed Lzf-Peter closed 5 years ago
@Lzf-Peter I am unable to reproduce your issue. Can you please make sure you've pulled the latest version of the code? Thanks.
I try to pull the latest version of the code, but there are same error.
Traceback (most recent call last):
File "/home/liu/brainstorm/main.py", line 357, in
@Lzf-Peter unfortunately I am still not able to repro your issue in the latest version of the code, even in a new directory. I would recommend pulling the code and following the setup instructions again in a new directory. Alternatively, it looks the issue is simply that the targets being fed to the network at train time are in the wrong order -- you could check that the batch generator is producing targets in the order expected by the flow network.
the shape of the batch produced by batch generator should be (160,192,224,1) or (160,192,224,3)?
@Lzf-Peter since I'm not sure which version of the code you are using, you should check on the network architecture yourself. The flow network is defined in create_models() in transform_models.py. You should be able to look at the order of the outputs to determine the desired shapes -- the transformed volume should be (160, 192, 224, 1), while the output flow should be (160, 192, 224, 3).
Ok,thank you for your explanation.
发自我的iPhone
------------------ Original ------------------ From: xamyzhao notifications@github.com Date: Tue,Jun 11,2019 0:04 AM To: xamyzhao/brainstorm brainstorm@noreply.github.com Cc: Lzf-Peter 734165132@qq.com, Mention mention@noreply.github.com Subject: Re: [xamyzhao/brainstorm] ValueError (#7)
Hi, thanks for your excellent work. But when I run python main.py trans --gpu 0 --data mri-100unlabeled --model flow-fwd by default, there are following errors. ValueError: Error when checking target: expected flow to have shape (None, 160, 192, 224, 3) but got array with shape (1, 160, 192, 224, 1)