When running demo.py, I got the following error. All the context are in GPU. How to resolve the issue? Thanks
Called with argument:
Namespace(batch_size=[2048, 256, 16], epoch=[16, 16, 16], gpu_id=0, min_face=40, prefix=['model/pnet', 'model/rnet', 'model/onet'], slide_window=False, stride=2, thresh=[0.5, 0.5, 0.7])
[14:18:51] /local/mnt/workspace/szhuo/mxnet/dmlc-core/include/dmlc/./logging.h:300: [14:18:51] src/executor/graph_executor.cc:240: Check failed: x.ctx() == default_ctx Input array is in cpu(0) while binding with ctx=gpu(0). All arguments must be in global context (gpu(0)) unless group2ctx is specified for cross-device graph.
Traceback (most recent call last):
File "demo.py", line 95, in
args.stride, args.slide_window)
File "demo.py", line 46, in test_net
boxes, boxes_c = mtcnn_detector.detect_pnet(img)
File "/local/mnt/workspace/szhuo/mxnet/example/mtcnn/core/MtcnnDetector.py", line 278, in detect_pnet
cls_map, reg = self.pnet_detector.predict(im_resized)
File "/local/mnt/workspace/szhuo/mxnet/example/mtcnn/core/fcn_detector.py", line 25, in predict
grad_req='null', aux_states=self.aux_params)
File "/local/mnt/workspace/szhuo/mxnet/python/mxnet/symbol.py", line 935, in bind
ctypes.byref(handle)))
File "/local/mnt/workspace/szhuo/mxnet/python/mxnet/base.py", line 77, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [14:40:58] src/executor/graph_executor.cc:240: Check failed: x.ctx() == default_ctx Input array is in cpu(0) while binding with ctx=gpu(0). All arguments must be in global context (gpu(0)) unless group2ctx is specified for cross-device graph.
When running demo.py, I got the following error. All the context are in GPU. How to resolve the issue? Thanks
Called with argument: Namespace(batch_size=[2048, 256, 16], epoch=[16, 16, 16], gpu_id=0, min_face=40, prefix=['model/pnet', 'model/rnet', 'model/onet'], slide_window=False, stride=2, thresh=[0.5, 0.5, 0.7])
[14:18:51] /local/mnt/workspace/szhuo/mxnet/dmlc-core/include/dmlc/./logging.h:300: [14:18:51] src/executor/graph_executor.cc:240: Check failed: x.ctx() == default_ctx Input array is in cpu(0) while binding with ctx=gpu(0). All arguments must be in global context (gpu(0)) unless group2ctx is specified for cross-device graph.