can't create operators implemented in detectron module
See original GitHub issueI want to use operators provided in detectron module. I tried UpsampleNearest and got the following error message.
E0221 11:07:40.414309 1997 operator.cc:130] Cannot find operator schema for UpsampleNearest. Will skip schema checking. terminate called after throwing an instance of ‘caffe2::EnforceNotMet’ what(): [enforce fail at operator.cc:190] op. Cannot create operator of type ‘UpsampleNearest’ on the device ‘CUDA’. Verify that implementation for the corresponding device exist. It might also happen if the binary is not linked with the operator implementation code. If Python frontend is used it might happen if dyndep.InitOpsLibrary call is missing. Operator def: input: “tensor1” output: “tensor2” type: “UpsampleNearest” arg { name: “scale” f: 2 } device_option { device_type: 1 }
The following code is what I tested.
name: "test"
network {
name: "network1"
op {
type: "GivenTensorFill"
output: "tensor1"
arg {
name: "shape"
ints: 1
ints: 2
ints: 3
ints: 3
}
arg {
name: "values"
floats: 13
floats: 22
floats: 3
floats: 14
floats: 53
floats: 26
floats: 7
floats: 38
floats: 9
floats: 11
floats: 41
floats: 15
floats: 10
floats: 54
floats: 22
floats: 92
floats: 2
floats: 8
}
}
op {
type: "UpsampleNearest"
input: "tensor1"
output: "tensor2"
arg {
name: "scale"
f: 2
}
}
op {
type: "Print"
input: "tensor2"
arg {
name: "to_file"
i: 1
}
}
device_option {
device_type: 1
}
}
execution_step {
network: "network1"
num_iter: 1
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Thx for the clue. I finally figure it out. caffe2 provides a function called LoadModule in C++. I can create operators of detectron after the following code
Following the
module_test_dynamic.cc
example from the Caffe2 repo, I think you should be able to load the Caffe2 Detectron module (caffe2_detectron_ops_gpu
lib) in the same way.