-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code error #2
Comments
def histc_fork(self,ij) not have self |
futures : List[torch.jit.Future[torch.Tensor]] = [] List是什么呢 |
请问cat的时候因为有radio导致维度不一致,怎么cat呢 |
Not encountered, you need to ensure that the input tensor dimensions are consistent: before using torch.cat, ensure that the tensors to be concatenated have the same shape in all dimensions except the concatenation dimension. You can use functions like torch.unsqueeze or torch.reshape to reshape tensors so that they have the same shape. Or use torch.stack: If the tensors you want to join are not consistent in all dimensions, you may consider using the torch.stack function. torch.stack creates a new dimension and stacks the input tensors in this new dimension. This will keep the dimensions of all input tensors consistent. Also consider using the dim parameter of torch.cat: When using torch.cat, be sure to specify the dim parameter to indicate in which dimension to join. This helps you ensure that you are concatenating tensors in the correct dimensions. |
Ok,thank you very much |
unet 181line,should write as:
if self.mode != 'ori':
c2 = torch.cat([c2, self.ife1(c2)],dim=1)
c3 = torch.cat([c3, self.ife2(c3)],dim=1)
The text was updated successfully, but these errors were encountered: