Hello,
I have trained a “FastRCNN model with resnet50 backbone” using pytorch framework to detect cars and trucks. This training was done on a x86 architecture computer. This trained model is able to detect cars and trucks and also place bounding boxes, on the same computer.
Later this trained model was then copied to an arm hardware device with Linux that runs python with arm64 architecture.
When this trained model is used to detect cars and trucks, this shows up the following error.
Traceback (most recent call last):
File “/home/nvidia/Desktop/test_env/python_programs/pytorch_cnn/1.obj_det/detection_car_truck/main_det.py”, line 82, in 
results = score_frame(frame, model,device=device)
File “/home/nvidia/Desktop/test_env/python_programs/pytorch_cnn/1.obj_det/detection_car_truck/obj_det_functions.py”, line 118, in score_frame
results = model([frame])
File “/home/nvidia/Softwares/miniconda3/envs/torch_cp37/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 727, in _call_impl
result = self.forward(*input, **kwargs)
File “/home/nvidia/Softwares/miniconda3/envs/torch_cp37/lib/python3.7/site-packages/torchvision/models/detection/generalized_rcnn.py”, line 100, in forward
detections, detector_losses = self.roi_heads(features, proposals, images.image_sizes, targets)
File “/home/nvidia/Softwares/miniconda3/envs/torch_cp37/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 727, in _call_impl
result = self.forward(*input, **kwargs)
File “/home/nvidia/Softwares/miniconda3/envs/torch_cp37/lib/python3.7/site-packages/torchvision/models/detection/roi_heads.py”, line 752, in forward
box_features = self.box_roi_pool(features, proposals, image_shapes)
File “/home/nvidia/Softwares/miniconda3/envs/torch_cp37/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 727, in _call_impl
result = self.forward(*input, **kwargs)
File “/home/nvidia/Softwares/miniconda3/envs/torch_cp37/lib/python3.7/site-packages/torchvision/ops/poolers.py”, line 213, in forward
self.setup_scales(x_filtered, image_shapes)
File “/home/nvidia/Softwares/miniconda3/envs/torch_cp37/lib/python3.7/site-packages/torchvision/ops/poolers.py”, line 174, in setup_scales
scales = [self.infer_scale(feat, original_input_shape) for feat in features]
File “/home/nvidia/Softwares/miniconda3/envs/torch_cp37/lib/python3.7/site-packages/torchvision/ops/poolers.py”, line 174, in 
scales = [self.infer_scale(feat, original_input_shape) for feat in features]
File “/home/nvidia/Softwares/miniconda3/envs/torch_cp37/lib/python3.7/site-packages/torchvision/ops/poolers.py”, line 158, in infer_scale
assert possible_scales[0] == possible_scales[1]
AssertionError
Can someone help me with this issue ?