chenzhi1992 / TensorRT-SSD

Use TensorRT API to implement Caffe-SSD, SSD(channel pruning), Mobilenet-SSD
251 stars 84 forks source link

An error occurred when I replaced the new pluginImplement.cpp #34

Open 408550969 opened 6 years ago

408550969 commented 6 years ago

I found that pluginImplement.cpp is updated, so I replaced the original pluginImplement.cpp, but I got an error after the replacement: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:295:24: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>’ and ‘std::unique_ptr’) mBox_loc_layer = std::unique_ptr(new ConcatPlugin(1)); ^ In file included from /usr/include/c++/5/memory:81:0, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvCaffeParser.h:56, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.h:11, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:1: /usr/include/c++/5/bits/unique_ptr.h:249:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr&& u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:249:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&&’ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: candidate: template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr<_Up, _Ep>&& u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: template argument deduction/substitution failed: /usr/include/c++/5/bits/unique_ptr.h: In substitution of ‘template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = ConcatPlugin; _Ep = std::default_delete]’: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:295:24: required from here /usr/include/c++/5/bits/unique_ptr.h:269:2: error: no type named ‘type’ in ‘struct std::enable_if<false, std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&>’ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin); std::nullptr_t = std::nullptr_t] operator=(nullptr_t) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::nullptr_t’ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:303:25: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>’ and ‘std::unique_ptr’) mBox_conf_layer = std::unique_ptr(new ConcatPlugin(1)); ^ In file included from /usr/include/c++/5/memory:81:0, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvCaffeParser.h:56, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.h:11, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:1: /usr/include/c++/5/bits/unique_ptr.h:249:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr&& u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:249:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&&’ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: candidate: template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr<_Up, _Ep>&& u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: template argument deduction/substitution failed: /usr/include/c++/5/bits/unique_ptr.h: In substitution of ‘template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = ConcatPlugin; _Ep = std::default_delete]’: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:303:25: required from here /usr/include/c++/5/bits/unique_ptr.h:269:2: error: no type named ‘type’ in ‘struct std::enable_if<false, std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&>’ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin); std::nullptr_t = std::nullptr_t] operator=(nullptr_t) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::nullptr_t’ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:311:29: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>’ and ‘std::unique_ptr’) mBox_priorbox_layer = std::unique_ptr(new ConcatPlugin(2) ^ In file included from /usr/include/c++/5/memory:81:0, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvCaffeParser.h:56, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.h:11, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:1: /usr/include/c++/5/bits/unique_ptr.h:249:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr&& u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:249:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&&’ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: candidate: template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr<_Up, _Ep>&& u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: template argument deduction/substitution failed: /usr/include/c++/5/bits/unique_ptr.h: In substitution of ‘template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = ConcatPlugin; _Ep = std::default_delete]’: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:311:29: required from here /usr/include/c++/5/bits/unique_ptr.h:269:2: error: no type named ‘type’ in ‘struct std::enable_if<false, std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&>’ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin); std::nullptr_t = std::nullptr_t] operator=(nullptr_t) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::nullptr_t’ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:407:75: error: invalid new-expression of abstract class type ‘SoftmaxPlugin’ mPluginSoftmax = std::unique_ptr(new SoftmaxPlugin()); ^ In file included from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:1:0: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.h:209:7: note: because the following virtual functions are pure within ‘SoftmaxPlugin’: class SoftmaxPlugin : public IPlugin ^ In file included from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvCaffeParser.h:58:0, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.h:11, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:1: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvInfer.h:1724:14: note: virtual int nvinfer1::IPlugin::getNbOutputs() const virtual int getNbOutputs() const = 0; ^ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvInfer.h:1734:15: note: virtual nvinfer1::Dims nvinfer1::IPlugin::getOutputDimensions(int, const nvinfer1::Dims, int) virtual Dims getOutputDimensions(int index, const Dims inputs, int nbInputDim ^ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvInfer.h:1750:15: note: virtual void nvinfer1::IPlugin::configure(const nvinfer1::Dims, int, const nvinfer1::Dims, int, int) virtual void configure(const Dims inputDims, int nbInputs, const Dims output ^ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvInfer.h:1759:14: note: virtual int nvinfer1::IPlugin::initialize() virtual int initialize() = 0; ^ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvInfer.h:1764:15: note: virtual void nvinfer1::IPlugin::terminate() virtual void terminate() = 0; ^ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvInfer.h:1775:17: note: virtual size_t nvinfer1::IPlugin::getWorkspaceSize(int) const virtual size_t getWorkspaceSize(int maxBatchSize) const = 0; ^ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvInfer.h:1789:14: note: virtual int nvinfer1::IPlugin::enqueue(int, const void const, void*, void, cudaStream_t) virtual int enqueue(int batchSize, const voidconst inputs, void outputs, ^ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvInfer.h:1797:17: note: virtual size_t nvinfer1::IPlugin::getSerializationSize() virtual size_t getSerializationSize() = 0; ^ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvInfer.h:1806:15: note: virtual void nvinfer1::IPlugin::serialize(void) virtual void serialize(void buffer) = 0; ^ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp: In member function ‘virtual nvinfer1::IPlugin PluginFactory::createPlugin(const char, const void, size_t)’: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:549:24: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>’ and ‘std::unique_ptr’) mBox_loc_layer = std::unique_ptr(new ConcatPlugin(1, seri ^ In file included from /usr/include/c++/5/memory:81:0, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvCaffeParser.h:56, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.h:11, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:1: /usr/include/c++/5/bits/unique_ptr.h:249:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr&& __u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:249:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&&’ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: candidate: template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::_not<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr<_Up, _Ep>&& u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: template argument deduction/substitution failed: /usr/include/c++/5/bits/unique_ptr.h: In substitution of ‘template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = ConcatPlugin; _Ep = std::default_delete]’: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:549:24: required from here /usr/include/c++/5/bits/unique_ptr.h:269:2: error: no type named ‘type’ in ‘struct std::enable_if<false, std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&>’ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin); std::nullptr_t = std::nullptr_t] operator=(nullptr_t) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::nullptr_t’ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:556:25: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>’ and ‘std::unique_ptr’) mBox_conf_layer = std::unique_ptr(new ConcatPlugin(1, ser ^ In file included from /usr/include/c++/5/memory:81:0, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvCaffeParser.h:56, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.h:11, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:1: /usr/include/c++/5/bits/unique_ptr.h:249:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr&& __u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:249:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&&’ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: candidate: template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::_not<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr<_Up, _Ep>&& u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: template argument deduction/substitution failed: /usr/include/c++/5/bits/unique_ptr.h: In substitution of ‘template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = ConcatPlugin; _Ep = std::default_delete]’: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:556:25: required from here /usr/include/c++/5/bits/unique_ptr.h:269:2: error: no type named ‘type’ in ‘struct std::enable_if<false, std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&>’ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin); std::nullptr_t = std::nullptr_t] operator=(nullptr_t) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::nullptr_t’ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:563:29: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>’ and ‘std::unique_ptr’) mBox_priorbox_layer = std::unique_ptr(new ConcatPlugin(2, ^ In file included from /usr/include/c++/5/memory:81:0, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/NvCaffeParser.h:56, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.h:11, from /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:1: /usr/include/c++/5/bits/unique_ptr.h:249:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr&& __u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:249:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&&’ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: candidate: template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::_not<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin)] operator=(unique_ptr<_Up, _Ep>&& u) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:269:2: note: template argument deduction/substitution failed: /usr/include/c++/5/bits/unique_ptr.h: In substitution of ‘template<class _Up, class _Ep> typename std::enable_if<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = ConcatPlugin; _Ep = std::default_delete]’: /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:563:29: required from here /usr/include/c++/5/bits/unique_ptr.h:269:2: error: no type named ‘type’ in ‘struct std::enable_if<false, std::unique_ptr<nvinfer1::plugin::INvPlugin, void ()(nvinfer1::plugin::INvPlugin)>&>’ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = nvinfer1::plugin::INvPlugin; _Dp = void ()(nvinfer1::plugin::INvPlugin); std::nullptr_t = std::nullptr_t] operator=(nullptr_t) noexcept ^ /usr/include/c++/5/bits/unique_ptr.h:278:7: note: no known conversion for argument 1 from ‘std::unique_ptr’ to ‘std::nullptr_t’ /home/cll/TensorRT-3.0.4/ssd300/tensorRTplugin/pluginImplement.cpp:656:99: error: invalid new-expression of abstract class type ‘SoftmaxPlugin’ = std::unique_ptr(new SoftmaxPlugin(serialData, serialLength)); ^ CMakeFiles/inferLib.dir/build.make:1640: recipe for target 'CMakeFiles/inferLib.dir/tensorRTplugin/pluginImplement.cpp.o' failed make[2]: [CMakeFiles/inferLib.dir/tensorRTplugin/pluginImplement.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/inferLib.dir/all' failed make[1]: [CMakeFiles/inferLib.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: [all] Error 2

chenzhi1992 commented 6 years ago

std::unique_ptr(new SoftmaxPlugin());