quic / aimet

AIMET is a library that provides advanced quantization and compression techniques for trained neural network models.
https://quic.github.io/aimet-pages/index.html
Other
2.08k stars 373 forks source link

Bug report #766

Open TingfengTang opened 2 years ago

TingfengTang commented 2 years ago

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))

return rand_tensors
quic-ssiddego commented 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.

TingfengTang commented 2 years ago

@quic-ssiddego, the input shape format like ((1,3,60,60),(1,1)) will reproduce the runtime error

quic-ssiddego commented 2 years ago

cc @quic-hitameht

quic-hitameht commented 1 year ago

Thanks for reporting this issue @TingfengTang.

Tagging: @quic-mangal