{"action":"created","issue":{"url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/349","repository_url":"https://api.github.com/repos/ppwwyyxx/tensorpack","labels_url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/349/labels{/name}","comments_url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/349/comments","events_url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/349/events","html_url":"https://github.com/ppwwyyxx/tensorpack/issues/349","id":246427804,"number":349,"title":"about DataParallelInferenceRunner","user":{"login":"chunfuchen","id":7079318,"avatar_url":"https://avatars3.githubusercontent.com/u/7079318?v=4","gravatar_id":"","url":"https://api.github.com/users/chunfuchen","html_url":"https://github.com/chunfuchen","followers_url":"https://api.github.com/users/chunfuchen/followers","following_url":"https://api.github.com/users/chunfuchen/following{/other_user}","gists_url":"https://api.github.com/users/chunfuchen/gists{/gist_id}","starred_url":"https://api.github.com/users/chunfuchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chunfuchen/subscriptions","organizations_url":"https://api.github.com/users/chunfuchen/orgs","repos_url":"https://api.github.com/users/chunfuchen/repos","events_url":"https://api.github.com/users/chunfuchen/events{/privacy}","received_events_url":"https://api.github.com/users/chunfuchen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-28T18:41:16Z","updated_at":"2017-07-28T18:43:26Z","closed_at":"2017-07-28T18:43:26Z","body":"Hi, I was trying to use `DataParallelInferenceRunner` to speed up evaluation in training. \r\nMay I give a hint how to use it? I am using 4 gpus for training.\r\n\r\nI changed your examples in ResNet (`cifar10-resnet`)\r\n\r\nfrom \r\n```python\r\nreturn TrainConfig(\r\n        dataflow=dataset_train,\r\n        callbacks=[\r\n            ModelSaver(),\r\n            InferenceRunner(dataset_test,\r\n                            [ScalarStats('cost'), ClassificationError()]),\r\n            ScheduledHyperParamSetter('learning_rate',\r\n                                      [(1, 0.1), (82, 0.01), (123, 0.001), (300, 0.0002)])\r\n        ],\r\n        model=Model(n=NUM_UNITS),\r\n        max_epoch=400,\r\n    )\r\n```\r\n\r\nto (change to `DataParallelInferenceRunner ` and give gpu list)\r\n```python\r\nreturn TrainConfig(\r\n        dataflow=dataset_train,\r\n        callbacks=[\r\n            ModelSaver(),\r\n            DataParallelInferenceRunner(dataset_test,\r\n                            [ScalarStats('cost'), ClassificationError()], [4, 5, 6, 7]),\r\n            ScheduledHyperParamSetter('learning_rate',\r\n                                      [(1, 0.1), (82, 0.01), (123, 0.001), (300, 0.0002)])\r\n        ],\r\n        model=Model(n=NUM_UNITS),\r\n        max_epoch=400,\r\n    )\r\n```\r\n\r\nHowever, it seems that the inference is still use one gpu (only one inference tower is built.)\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/comments/318732529","html_url":"https://github.com/ppwwyyxx/tensorpack/issues/349#issuecomment-318732529","issue_url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/349","id":318732529,"user":{"login":"chunfuchen","id":7079318,"avatar_url":"https://avatars3.githubusercontent.com/u/7079318?v=4","gravatar_id":"","url":"https://api.github.com/users/chunfuchen","html_url":"https://github.com/chunfuchen","followers_url":"https://api.github.com/users/chunfuchen/followers","following_url":"https://api.github.com/users/chunfuchen/following{/other_user}","gists_url":"https://api.github.com/users/chunfuchen/gists{/gist_id}","starred_url":"https://api.github.com/users/chunfuchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chunfuchen/subscriptions","organizations_url":"https://api.github.com/users/chunfuchen/orgs","repos_url":"https://api.github.com/users/chunfuchen/repos","events_url":"https://api.github.com/users/chunfuchen/events{/privacy}","received_events_url":"https://api.github.com/users/chunfuchen/received_events","type":"User","site_admin":false},"created_at":"2017-07-28T18:43:26Z","updated_at":"2017-07-28T18:43:26Z","body":"my bad. my usage is correct. just my file on server is not up-to-date.."}}
{"actor":{"display_login":"chunfuchen"}}