{"action":"created","issue":{"url":"https://api.github.com/repos/amdegroot/ssd.pytorch/issues/174","repository_url":"https://api.github.com/repos/amdegroot/ssd.pytorch","labels_url":"https://api.github.com/repos/amdegroot/ssd.pytorch/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/amdegroot/ssd.pytorch/issues/174/comments","events_url":"https://api.github.com/repos/amdegroot/ssd.pytorch/issues/174/events","html_url":"https://github.com/amdegroot/ssd.pytorch/issues/174","id":330101537,"node_id":"MDU6SXNzdWUzMzAxMDE1Mzc=","number":174,"title":"Bug in train.py","user":{"login":"bobo0810","id":26057879,"node_id":"MDQ6VXNlcjI2MDU3ODc5","avatar_url":"https://avatars0.githubusercontent.com/u/26057879?v=4","gravatar_id":"","url":"https://api.github.com/users/bobo0810","html_url":"https://github.com/bobo0810","followers_url":"https://api.github.com/users/bobo0810/followers","following_url":"https://api.github.com/users/bobo0810/following{/other_user}","gists_url":"https://api.github.com/users/bobo0810/gists{/gist_id}","starred_url":"https://api.github.com/users/bobo0810/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobo0810/subscriptions","organizations_url":"https://api.github.com/users/bobo0810/orgs","repos_url":"https://api.github.com/users/bobo0810/repos","events_url":"https://api.github.com/users/bobo0810/events{/privacy}","received_events_url":"https://api.github.com/users/bobo0810/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-06-07T03:12:37Z","updated_at":"2018-07-31T03:33:53Z","closed_at":null,"author_association":"NONE","body":"In the 165 or so lines of code:\r\nImages,target = next(batch_iterator)\r\n\r\nBug Description:\r\n The above code can only read the data set once. After reading through the data set, the program will stop.\r\n\r\nSolution:\r\nThe code is changed to:\r\n  \r\n  # load train data\r\n  Try:\r\n      Images,target = next(batch_iterator)\r\n  Except StopIteration:    #Start a new iteration\r\n      Batch_iterator = iter(data_loader)\r\n      Images,target = next(batch_iterator)"},"comment":{"url":"https://api.github.com/repos/amdegroot/ssd.pytorch/issues/comments/409083420","html_url":"https://github.com/amdegroot/ssd.pytorch/issues/174#issuecomment-409083420","issue_url":"https://api.github.com/repos/amdegroot/ssd.pytorch/issues/174","id":409083420,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTA4MzQyMA==","user":{"login":"hust-kevin","id":23699630,"node_id":"MDQ6VXNlcjIzNjk5NjMw","avatar_url":"https://avatars1.githubusercontent.com/u/23699630?v=4","gravatar_id":"","url":"https://api.github.com/users/hust-kevin","html_url":"https://github.com/hust-kevin","followers_url":"https://api.github.com/users/hust-kevin/followers","following_url":"https://api.github.com/users/hust-kevin/following{/other_user}","gists_url":"https://api.github.com/users/hust-kevin/gists{/gist_id}","starred_url":"https://api.github.com/users/hust-kevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hust-kevin/subscriptions","organizations_url":"https://api.github.com/users/hust-kevin/orgs","repos_url":"https://api.github.com/users/hust-kevin/repos","events_url":"https://api.github.com/users/hust-kevin/events{/privacy}","received_events_url":"https://api.github.com/users/hust-kevin/received_events","type":"User","site_admin":false},"created_at":"2018-07-31T03:33:52Z","updated_at":"2018-07-31T03:33:52Z","author_association":"NONE","body":"@bobo0810 @visor2020  hey！ I have a question in train.py ,why there sometimes use 'ssd_net' sometimes 'net':\r\n ssd_net = build_ssd('train', cfg['min_dim'], cfg['num_classes'])\r\n    net = ssd_net\r\n\r\n    if args.cuda:\r\n        net = torch.nn.DataParallel(ssd_net)\r\n        cudnn.benchmark = True\r\n\r\n    if args.resume:\r\n        print('Resuming training, loading {}...'.format(args.resume))\r\n        ssd_net.load_weights(args.resume)\r\n    else:\r\n        vgg_weights = torch.load(args.save_folder + args.basenet)\r\n        print('Loading base network...')\r\n        ssd_net.vgg.load_state_dict(vgg_weights)  #\r\n\r\n    if args.cuda:\r\n        net = net.cuda()\r\n\r\n    if not args.resume:\r\n        print('Initializing weights...')\r\n        # initialize newly added layers' weights with xavier method\r\n        ssd_net.extras.apply(weights_init)\r\n        ssd_net.loc.apply(weights_init)\r\n        ssd_net.conf.apply(weights_init)\r\n\r\n    optimizer = optim.SGD(net.parameters(), lr=args.lr, momentum=args.momentum,\r\n                          weight_decay=args.weight_decay)\r\n    criterion = MultiBoxLoss(cfg['num_classes'], 0.5, True, 0, True, 3, 0.5,\r\n                             False, args.cuda)\r\n\r\nI can't understand it,can you help me ? thank you"}}
{"actor":{"display_login":"hust-kevin"}}