gaocong13 / Projective-Spatial-Transformers

Generalizing Spatial Transformers to Projective Geometry with Applications to 2D/3D Registration
117 stars 21 forks source link

An error when I do setup.py install in compute_70 #25

Open puallee opened 1 year ago

puallee commented 1 year ago

when I do python3.8 setup.py install, I have a error, and My -gencode=arch=compute_70,code=sm_70', my computer can not support 7.5 or 8.0

/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>}; bool = true; _Elements = {const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&}]’: /usr/include/c++/6/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’ /usr/include/c++/6/tuple:1545:43: required from ‘constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {const c10::optional, const c10::VaryingShape, const c10::VaryingShape, const c10::optional}]’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/util/hash.h:139:58: required from ‘size_t c10::get_hash(const Types& ...) [with Types = {c10::optional, c10::VaryingShape, c10::VaryingShape, c10::optional}; size_t = long unsigned int]’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/jit/runtime/argument_spec.h:458:238: required from here /usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’ return and_<is_constructible<_Elements, _UElements&&>...>::value; ^~~~~ /usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>}; bool = true; _Elements = {const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&}]’: /usr/include/c++/6/tuple:626:362: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’ /usr/include/c++/6/tuple:1545:43: required from ‘constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {const c10::optional, const c10::VaryingShape, const c10::VaryingShape, const c10::optional}]’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/util/hash.h:139:58: required from ‘size_t c10::get_hash(const Types& ...) [with Types = {c10::optional, c10::VaryingShape, c10::VaryingShape, c10::optional}; size_t = long unsigned int]’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/jit/runtime/argument_spec.h:458:238: required from here /usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding ‘std::is_convertible<_UElements&&, _Elements>’ return and_<is_convertible<_UElements&&, _Elements>...>::value; ^~~~~ /usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>&; bool = true; _Elements = {const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&}]’: /usr/include/c++/6/tuple:662:419: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type > constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type = ]’ /usr/include/c++/6/tuple:1545:43: required from ‘constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {const c10::optional, const c10::VaryingShape, const c10::VaryingShape, const c10::optional}]’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/util/hash.h:139:58: required from ‘size_t c10::get_hash(const Types& ...) [with Types = {c10::optional, c10::VaryingShape, c10::VaryingShape, c10::optional}; size_t = long unsigned int]’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/jit/runtime/argument_spec.h:458:238: required from here /usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (5, should be 2) return and_<_not<is_same<tuple<_Elements...>, ^ /usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’ struct is_convertible ^~~~~~ /usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>&&; bool = true; _Elements = {const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&}]’: /usr/include/c++/6/tuple:686:422: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type > constexpr std::tuple< >::tuple(std::tuple<_Args1 ...>&&) [with _UElements = {const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), const c10::optional&, const c10::VaryingShape&, const c10::VaryingShape&, const c10::optional&>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type = ]’ /usr/include/c++/6/tuple:1545:43: required from ‘constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {const c10::optional, const c10::VaryingShape, const c10::VaryingShape, const c10::optional}]’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/util/hash.h:139:58: required from ‘size_t c10::get_hash(const Types& ...) [with Types = {c10::optional, c10::VaryingShape, c10::VaryingShape, c10::optional}; size_t = long unsigned int]’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/jit/runtime/argument_spec.h:458:238: required from here /usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (5, should be 2) return and_<_not<is_same<tuple<_Elements...>, ^ /usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’ struct is_convertible ^~~~~~ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h: In instantiation of ‘torch::nn::ConvOptions::ConvOptions(int64_t, int64_t, torch::ExpandingArray) [with long unsigned int D = 1ul; int64_t = long int]’: /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:135:85: required from here /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h:99:107: error: could not convert ‘torch::kZeros’ from ‘const torch::enumtype::kZeros’ to ‘torch::nn::ConvOptions<1ul>::padding_mode_t {aka c10::variant<torch::enumtype::kZeros, torch::enumtype::kReflect, torch::enumtype::kReplicate, torch::enumtype::kCircular>}’ ExpandingArray kernel_size) : ^ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h: In instantiation of ‘torch::nn::ConvOptions::ConvOptions(int64_t, int64_t, torch::ExpandingArray) [with long unsigned int D = 2ul; int64_t = long int]’: /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:167:85: required from here /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h:99:107: error: could not convert ‘torch::kZeros’ from ‘const torch::enumtype::kZeros’ to ‘torch::nn::ConvOptions<2ul>::padding_mode_t {aka c10::variant<torch::enumtype::kZeros, torch::enumtype::kReflect, torch::enumtype::kReplicate, torch::enumtype::kCircular>}’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h: In instantiation of ‘torch::nn::ConvOptions::ConvOptions(int64_t, int64_t, torch::ExpandingArray) [with long unsigned int D = 3ul; int64_t = long int]’: /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:202:85: required from here /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h:99:107: error: could not convert ‘torch::kZeros’ from ‘const torch::enumtype::kZeros’ to ‘torch::nn::ConvOptions<3ul>::padding_mode_t {aka c10::variant<torch::enumtype::kZeros, torch::enumtype::kReflect, torch::enumtype::kReplicate, torch::enumtype::kCircular>}’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h: In instantiation of ‘torch::nn::ConvTransposeOptions::ConvTransposeOptions(int64_t, int64_t, torch::ExpandingArray) [with long unsigned int D = 1ul; int64_t = long int]’: /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:277:103: required from here /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h:240:107: error: could not convert ‘torch::kZeros’ from ‘const torch::enumtype::kZeros’ to ‘torch::nn::ConvTransposeOptions<1ul>::padding_mode_t {aka c10::variant<torch::enumtype::kZeros, torch::enumtype::kReflect, torch::enumtype::kReplicate, torch::enumtype::kCircular>}’ ExpandingArray kernel_size) : ^ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h: In instantiation of ‘torch::nn::ConvTransposeOptions::ConvTransposeOptions(int64_t, int64_t, torch::ExpandingArray) [with long unsigned int D = 2ul; int64_t = long int]’: /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:312:103: required from here /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h:240:107: error: could not convert ‘torch::kZeros’ from ‘const torch::enumtype::kZeros’ to ‘torch::nn::ConvTransposeOptions<2ul>::padding_mode_t {aka c10::variant<torch::enumtype::kZeros, torch::enumtype::kReflect, torch::enumtype::kReplicate, torch::enumtype::kCircular>}’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h: In instantiation of ‘torch::nn::ConvTransposeOptions::ConvTransposeOptions(int64_t, int64_t, torch::ExpandingArray) [with long unsigned int D = 3ul; int64_t = long int]’: /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:347:103: required from here /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/options/conv.h:240:107: error: could not convert ‘torch::kZeros’ from ‘const torch::enumtype::kZeros’ to ‘torch::nn::ConvTransposeOptions<3ul>::padding_mode_t {aka c10::variant<torch::enumtype::kZeros, torch::enumtype::kReflect, torch::enumtype::kReplicate, torch::enumtype::kCircular>}’ /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/pybind11/cast.h: In instantiation of ‘T pybind11::object::cast() && [with T = std::basic_string]’: /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/pybind11/detail/class.h:618:140: required from here /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/pybind11/cast.h:1806:68: error: could not convert ‘pybind11::cast<std::basic_string >(( & std::move<pybind11::object&>(((pybind11::object)this))))’ from ‘int’ to ‘std::basic_string’ template T object::cast() && { return pybind11::cast(std::move(this)); }


/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/pybind11/cast.h: In instantiation of ‘int pybind11::cast(pybind11::object&&) [with T = std::basic_string<char>]’:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/pybind11/cast.h:1806:68:   required from ‘T pybind11::object::cast() && [with T = std::basic_string<char>]’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/pybind11/detail/class.h:618:140:   required from here
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/pybind11/cast.h:1802:24: error: cannot convert ‘std::basic_string<char>’ to ‘int’ in return
     return cast<T>(object);
                        ^
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 3ul; Derived = torch::nn::ConvTranspose3dImpl]’:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:62:17:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 3ul; Derived = torch::nn::ConvTranspose3dImpl]’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48:   required from here
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kFanIn’ from ‘const torch::enumtype::kFanIn’ to ‘torch::nn::init::FanModeType {aka c10::variant<torch::enumtype::kFanIn, torch::enumtype::kFanOut>}’
     init::kaiming_uniform_(weight, /*a=*/std::sqrt(5));  // NOLINT(cppcoreguidelines-avoid-magic-numbers)
     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kLeakyReLU’ from ‘const torch::enumtype::kLeakyReLU’ to ‘torch::nn::init::NonlinearityType {aka c10::variant<torch::enumtype::kLinear, torch::enumtype::kConv1D, torch::enumtype::kConv2D, torch::enumtype::kConv3D, torch::enumtype::kConvTranspose1D, torch::enumtype::kConvTranspose2D, torch::enumtype::kConvTranspose3D, torch::enumtype::kSigmoid, torch::enumtype::kTanh, torch::enumtype::kReLU, torch::enumtype::kLeakyReLU>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 2ul; Derived = torch::nn::ConvTranspose2dImpl]’:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:62:17:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 2ul; Derived = torch::nn::ConvTranspose2dImpl]’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48:   required from here
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kFanIn’ from ‘const torch::enumtype::kFanIn’ to ‘torch::nn::init::FanModeType {aka c10::variant<torch::enumtype::kFanIn, torch::enumtype::kFanOut>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kLeakyReLU’ from ‘const torch::enumtype::kLeakyReLU’ to ‘torch::nn::init::NonlinearityType {aka c10::variant<torch::enumtype::kLinear, torch::enumtype::kConv1D, torch::enumtype::kConv2D, torch::enumtype::kConv3D, torch::enumtype::kConvTranspose1D, torch::enumtype::kConvTranspose2D, torch::enumtype::kConvTranspose3D, torch::enumtype::kSigmoid, torch::enumtype::kTanh, torch::enumtype::kReLU, torch::enumtype::kLeakyReLU>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 1ul; Derived = torch::nn::ConvTranspose1dImpl]’:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:62:17:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 1ul; Derived = torch::nn::ConvTranspose1dImpl]’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48:   required from here
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kFanIn’ from ‘const torch::enumtype::kFanIn’ to ‘torch::nn::init::FanModeType {aka c10::variant<torch::enumtype::kFanIn, torch::enumtype::kFanOut>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kLeakyReLU’ from ‘const torch::enumtype::kLeakyReLU’ to ‘torch::nn::init::NonlinearityType {aka c10::variant<torch::enumtype::kLinear, torch::enumtype::kConv1D, torch::enumtype::kConv2D, torch::enumtype::kConv3D, torch::enumtype::kConvTranspose1D, torch::enumtype::kConvTranspose2D, torch::enumtype::kConvTranspose3D, torch::enumtype::kSigmoid, torch::enumtype::kTanh, torch::enumtype::kReLU, torch::enumtype::kLeakyReLU>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 3ul; Derived = torch::nn::Conv3dImpl]’:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:62:17:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 3ul; Derived = torch::nn::Conv3dImpl]’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48:   required from here
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kFanIn’ from ‘const torch::enumtype::kFanIn’ to ‘torch::nn::init::FanModeType {aka c10::variant<torch::enumtype::kFanIn, torch::enumtype::kFanOut>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kLeakyReLU’ from ‘const torch::enumtype::kLeakyReLU’ to ‘torch::nn::init::NonlinearityType {aka c10::variant<torch::enumtype::kLinear, torch::enumtype::kConv1D, torch::enumtype::kConv2D, torch::enumtype::kConv3D, torch::enumtype::kConvTranspose1D, torch::enumtype::kConvTranspose2D, torch::enumtype::kConvTranspose3D, torch::enumtype::kSigmoid, torch::enumtype::kTanh, torch::enumtype::kReLU, torch::enumtype::kLeakyReLU>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 2ul; Derived = torch::nn::Conv2dImpl]’:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:62:17:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 2ul; Derived = torch::nn::Conv2dImpl]’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48:   required from here
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kFanIn’ from ‘const torch::enumtype::kFanIn’ to ‘torch::nn::init::FanModeType {aka c10::variant<torch::enumtype::kFanIn, torch::enumtype::kFanOut>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kLeakyReLU’ from ‘const torch::enumtype::kLeakyReLU’ to ‘torch::nn::init::NonlinearityType {aka c10::variant<torch::enumtype::kLinear, torch::enumtype::kConv1D, torch::enumtype::kConv2D, torch::enumtype::kConv3D, torch::enumtype::kConvTranspose1D, torch::enumtype::kConvTranspose2D, torch::enumtype::kConvTranspose3D, torch::enumtype::kSigmoid, torch::enumtype::kTanh, torch::enumtype::kReLU, torch::enumtype::kLeakyReLU>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 1ul; Derived = torch::nn::Conv1dImpl]’:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:62:17:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 1ul; Derived = torch::nn::Conv1dImpl]’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48:   required from here
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kFanIn’ from ‘const torch::enumtype::kFanIn’ to ‘torch::nn::init::FanModeType {aka c10::variant<torch::enumtype::kFanIn, torch::enumtype::kFanOut>}’
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:66:23: error: could not convert ‘torch::kLeakyReLU’ from ‘const torch::enumtype::kLeakyReLU’ to ‘torch::nn::init::NonlinearityType {aka c10::variant<torch::enumtype::kLinear, torch::enumtype::kConv1D, torch::enumtype::kConv2D, torch::enumtype::kConv3D, torch::enumtype::kConvTranspose1D, torch::enumtype::kConvTranspose2D, torch::enumtype::kConvTranspose3D, torch::enumtype::kSigmoid, torch::enumtype::kTanh, torch::enumtype::kReLU, torch::enumtype::kLeakyReLU>}’
error: command '/usr/bin/nvcc' failed with exit code 1
gaocong13 commented 1 year ago

Hi, I am not entirely sure, but it looks like a C++ compiler issue in your local environment.