{"action":"closed","issue":{"url":"https://api.github.com/repos/ayooshkathuria/pytorch-yolo-v3/issues/1","repository_url":"https://api.github.com/repos/ayooshkathuria/pytorch-yolo-v3","labels_url":"https://api.github.com/repos/ayooshkathuria/pytorch-yolo-v3/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ayooshkathuria/pytorch-yolo-v3/issues/1/comments","events_url":"https://api.github.com/repos/ayooshkathuria/pytorch-yolo-v3/issues/1/events","html_url":"https://github.com/ayooshkathuria/pytorch-yolo-v3/issues/1","id":314326529,"number":1,"title":"Tensors have different dimensions","user":{"login":"brchlluk","id":18639856,"avatar_url":"https://avatars3.githubusercontent.com/u/18639856?v=4","gravatar_id":"","url":"https://api.github.com/users/brchlluk","html_url":"https://github.com/brchlluk","followers_url":"https://api.github.com/users/brchlluk/followers","following_url":"https://api.github.com/users/brchlluk/following{/other_user}","gists_url":"https://api.github.com/users/brchlluk/gists{/gist_id}","starred_url":"https://api.github.com/users/brchlluk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brchlluk/subscriptions","organizations_url":"https://api.github.com/users/brchlluk/orgs","repos_url":"https://api.github.com/users/brchlluk/repos","events_url":"https://api.github.com/users/brchlluk/events{/privacy}","received_events_url":"https://api.github.com/users/brchlluk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-04-14T12:49:18Z","updated_at":"2018-04-14T18:58:49Z","closed_at":"2018-04-14T18:58:49Z","author_association":"NONE","body":"Hi,\r\nfirstly, thank you for your work on this repo. I tried to run your code, but I get this exception:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/lukas/dev/pytorch-yolo-v3/detect.py\", line 183, in <module>\r\n    prediction = write_results(prediction, confidence, num_classes, nms = True, nms_conf = nms_thesh)\r\n  File \"/home/lukas/dev/pytorch-yolo-v3/util.py\", line 189, in write_results\r\n    output = torch.cat(seq, 0)\r\nRuntimeError: invalid argument 0: Tensors must have same number of dimensions: got 1 and 2 at /tmp/pip-w41ywlv_-build/aten/src/THC/generic/THCTensorMath.cu:102\r\n\r\n```\r\nI tried to debug what is happening in the code, but it is not very clear to me. I only noticed that in my case, one tensor's size is 7 and the other is (7,1). I am also adding a screen.\r\n![image](https://user-images.githubusercontent.com/18639856/38768333-6d9dd7c4-3ff2-11e8-84e2-3caa5d2dec71.png)\r\n \r\nSo I have modified the 7 sized tensor into (7,1) dimension but then I get another exception from further code.\r\n```\r\nTraceback (most recent call last):\r\n  File \"/opt/pycharm-2018.1/helpers/pydev/pydevd.py\", line 1664, in <module>\r\n    main()\r\n  File \"/opt/pycharm-2018.1/helpers/pydev/pydevd.py\", line 1658, in main\r\n    globals = debugger.run(setup['file'], None, None, is_module)\r\n  File \"/opt/pycharm-2018.1/helpers/pydev/pydevd.py\", line 1068, in run\r\n    pydev_imports.execfile(file, globals, locals)  # execute the script\r\n  File \"/opt/pycharm-2018.1/helpers/pydev/_pydev_imps/_pydev_execfile.py\", line 18, in execfile\r\n    exec(compile(contents+\"\\n\", file, 'exec'), glob, loc)\r\n  File \"/home/lukas/dev/pytorch-yolo-v3/detect.py\", line 213, in <module>\r\n    objs = [classes[int(x[-1])] for x in output if int(x[0]) == im_id]\r\n  File \"/home/lukas/dev/pytorch-yolo-v3/detect.py\", line 213, in <listcomp>\r\n    objs = [classes[int(x[-1])] for x in output if int(x[0]) == im_id]\r\nIndexError: list index out of range\r\n```\r\n\r\nDon't you please know what I am doing wrong? It is my first time working with PyTorch, so I am not very experienced and I don't know how to fix it myself.\r\n\r\nUsing Ubuntu 16.4, Python 3.6, CUDA 9.0, PyTorch 0.4.\r\nThanks"}}
{"actor":{"display_login":"ayooshkathuria"}}