sksq96 / pytorch-summary

Model summary in PyTorch similar to `model.summary()` in Keras
MIT License
3.98k stars 412 forks source link

Boolean value of Tensor with more than one value is ambiguous #197

Open ljhOfGithub opened 9 months ago

ljhOfGithub commented 9 months ago

the following is my forward:forward(self,pos_fea,subtype,channels),where channels is a parameter of torch.Tensor,and its shape is torch.Size([1]).In the forward,there is a sentence to judge the value of channels:if channels == 2048. When I use summary(model, [(512,1024,2048),(1,2048),[2048]]) I got the above error,how should I use the summary function to get my expected results?