question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't create operators implemented in detectron module

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
breadbread1984commented, Feb 23, 2018

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

LoadModule("","/path/to/libcaffe2_detectron_ops_gpu.so");
0reactions
ir413commented, Feb 23, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

detectron2.layers
See Sec 5.2 in Rethinking “Batch” in BatchNorm. This module implements it by using N separate BN layers and it cycles through them...
Read more >
Model Zoo - Deep learning code and pretrained models for ...
ModelZoo curates and provides a platform for deep learning researchers to easily find code and pre-trained models for a variety of platforms and...
Read more >
Detectron2 - Next Gen Object Detection Library - Yuxin Wu
Learn about Detectron2, an object detection library now implemented in PyTorch. Detectron2 provides support for the latest models and tasks, ...
Read more >
Operators — Torchvision main documentation - PyTorch
torchvision.ops implements operators, losses and layers that are specific for Computer ... Module that adds a FPN from on top of a set...
Read more >
Detectron2 - Object Detection with PyTorch - Gilbert Tanner
Detectron2 is Facebooks new vision library that allows us to easily us and create object detection, instance segmentation, keypoint detection and panoptic ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found