Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling Error #12

Open
ZifaZhu opened this issue Sep 24, 2021 · 0 comments
Open

Compiling Error #12

ZifaZhu opened this issue Sep 24, 2021 · 0 comments

Comments

@ZifaZhu
Copy link

ZifaZhu commented Sep 24, 2021

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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48: required from here
/home/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48: required from here
/home/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48: required from here
/home/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48: required from here
/home/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:48:48: required from here
/home/sofa/.local/lib/python3.6/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/sofa/.local/lib/python3.6/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>}’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant