text: 
  
  TITLE
  facebook/detr-resnet output tensor contains all nan value 
  
  COMMENTS
  1
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  ### System Info
  
  ```shell
  Ubuntu 20.04 - aarch64
  Pytorch Version: 1.11.0 (from source)
  Transformers: 4.18.0
  Torchvision: 0.12.9 (from source)
  
  Model: facebook/detr-resnet-50
  ```
  
  
  ### Who can help?
  
  @NielsRogge 
  
  ### Information
  
  - [X] The official example scripts
  - [ ] My own modified scripts
  
  ### Tasks
  
  - [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
  - [ ] My own task or dataset (give details below)
  
  ### Reproduction
  
  I ran the following code : 
  ```
  from transformers import DetrFeatureExtractor, DetrForObjectDetection
  from PIL import Image
  import requests
  
  url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
  image = Image.open(requests.get(url, stream=True).raw)
  
  feature_extractor = DetrFeatureExtractor.from_pretrained('facebook/detr-resnet-50')
  model = DetrForObjectDetection.from_pretrained('facebook/detr-resnet-50')
  
  inputs = feature_extractor(images=image, return_tensors="pt")
  outputs = model(**inputs)
  
  # model predicts bounding boxes and corresponding COCO classes
  logits = outputs.logits
  bboxes = outputs.pred_boxes
  ```
  
  from this page: https://huggingface.co/facebook/detr-resnet-50
  
  But the output tensor for the bounding boxes all contains nan values:
  ```
  tensor([[[nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan],
           [nan, nan, nan, nan]]], grad_fn=<SigmoidBackward0>)
  ```
  
  
  ### Expected behavior
  
  I looked around the web and this is the closest answer I found: 
  https://forums.developer.nvidia.com/t/pytorch-1-7-nan-results/160462/7
  
  It claims that the machine I'm running on (Jetson Nano) doesn’t support concurrent access of memory buffer and if the CPU and GPU try to access the same buffer at the same time(ex. adjacency layer but different processor), the return data will be undefined. 
  
  Just want to know what I'm missing and how I could debug this further. I've tested the same code example on an x86 machine with Cuda and its output is as expected. Thank you!
  