【论文复现】Conv2D前向传播报错:received input_data_type:6 != filter_data_type:5
Created by: Ryan906k9
-
版本、环境信息: 1)PaddlePaddle版本:1.8.3 4)系统环境:Python 3.7
-
问题描述: `Traceback (most recent call last): File "/Users/rai/PycharmProjects/ugan/UGATIT-paddle/main.py", line 96, in main() File "/Users/rai/PycharmProjects/ugan/UGATIT-paddle/main.py", line 88, in main gan.train() File "/Users/rai/PycharmProjects/ugan/UGATIT-paddle/UGATIT.py", line 276, in train fake_A2B, _, _ = self.genA2B(real_A) File "/Users/rai/opt/anaconda3/envs/gan/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 461, in call outputs = self.forward(*inputs, **kwargs) File "/Users/rai/PycharmProjects/ugan/UGATIT-paddle/networks.py", line 101, in forward x = self.conv1(x) File "/Users/rai/opt/anaconda3/envs/gan/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 461, in call outputs = self.forward(*inputs, **kwargs) File "/Users/rai/opt/anaconda3/envs/gan/lib/python3.7/site-packages/paddle/fluid/dygraph/nn.py", line 230, in forward out = core.ops.conv2d(input, self.weight, *attrs) paddle.fluid.core_avx.EnforceNotMet:
C++ Call Stacks (More useful to developers):
0 std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > paddle::platform::GetTraceBackString<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&>(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*, int) 1 paddle::operators::ConvOp::GetExpectedKernelType(paddle::framework::ExecutionContext const&) const 2 paddle::imperative::PreparedOp paddle::imperative::PrepareOpImplpaddle::imperative::VarBase(paddle::imperative::details::NameVarMapTraitpaddle::imperative::VarBase::Type const&, paddle::imperative::details::NameVarMapTraitpaddle::imperative::VarBase::Type const&, paddle::framework::OperatorWithKernel const&, paddle::platform::Place, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void> > > > const&) 3 paddle::imperative::PreparedOp::Prepare(std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > > > > > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > > > > > const&, paddle::framework::OperatorWithKernel const&, paddle::platform::Place const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void> > > > const&) 4 paddle::imperative::OpBase::Run(paddle::framework::OperatorBase const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > > > > > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > > > > > const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void> > > > const&, paddle::platform::Place const&) 5 paddle::imperative::Tracer::TraceOp(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > > > > > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > > > > > const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void> > > >, paddle::platform::Place const&, bool) 6 paddle::imperative::Tracer::TraceOp(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > > > > > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::vector<std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::allocator<std::__1::shared_ptrpaddle::imperative::VarBase > > > > > const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, boost::variant<boost::blank, int, float, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::vector<int, std::__1::allocator >, std::__1::vector<float, std::__1::allocator >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, bool, std::__1::vector<bool, std::__1::allocator >, paddle::framework::BlockDesc*, long long, std::_1::vector<paddle::framework::BlockDesc*, std::1::allocatorpaddle::framework::BlockDesc* >, std::1::vector<long long, std::1::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void> > > >) 7 paddle::pybind::imperative_conv2d(std::__1::shared_ptrpaddle::imperative::VarBase const&, std::__1::shared_ptrpaddle::imperative::VarBase const&, pybind11::args const&) 8 void pybind11::cpp_function::initialize<std::__1::shared_ptrpaddle::imperative::VarBase (&)(std::__1::shared_ptrpaddle::imperative::VarBase const&, std::__1::shared_ptrpaddle::imperative::VarBase const&, pybind11::args const&), std::__1::shared_ptrpaddle::imperative::VarBase, std::__1::shared_ptrpaddle::imperative::VarBase const&, std::__1::shared_ptrpaddle::imperative::VarBase const&, pybind11::args const&, pybind11::name, pybind11::scope, pybind11::sibling>(std::__1::shared_ptrpaddle::imperative::VarBase (&)(std::__1::shared_ptrpaddle::imperative::VarBase const&, std::__1::shared_ptrpaddle::imperative::VarBase const&, pybind11::args const&), std::__1::shared_ptrpaddle::imperative::VarBase ()(std::__1::shared_ptrpaddle::imperative::VarBase const&, std::__1::shared_ptrpaddle::imperative::VarBase const&, pybind11::args const&), pybind11::name const&, pybind11::scope const&, pybind11::sibling const&)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const 9 pybind11::cpp_function::dispatcher(_object, _object*, _object*)
Error Message Summary:
InvalidArgumentError: input and filter data type should be consistent [Hint: Expected input_data_type == filter_data_type, but received input_data_type:6 != filter_data_type:5.] at (/home/teamcity/work/ef54dc8a5b211854/paddle/fluid/operators/conv_op.cc:173)`