Open TingfengTang opened 2 years ago
@TingfengTang Thank you for reporting this. Could you please share the inputs you used and the error? @quic-hitameht could you please follow up on this.
@quic-ssiddego, the input shape format like ((1,3,60,60),(1,1)) will reproduce the runtime error
cc @quic-hitameht
Thanks for reporting this issue @TingfengTang.
Tagging: @quic-mangal
Hi, there is a bug in the following function, the argument input_shape must be convert to list using function list(), otherwise it will case an error if the input exceeds 1. def create_rand_tensors_given_shapes(input_shape: Union[Tuple, List[Tuple]], device: torch.device = None) \ -> List[torch.Tensor]: if isinstance(input_shape, List): input_shapes = input_shape else: # input_shapes = [input_shape] input_shapes=list(input_shape) rand_tensors = [] for shape in input_shapes: if device is not None: rand_tensors.append(torch.rand(shape).to(device)) else: rand_tensors.append(torch.rand(shape))