trainable=False参数,triplet loss中,报错XXX@GRAD找不到
Created by: yinweichong
-
版本、环境信息: 1)PaddlePaddle版本:fluid1.5 2)GPU:Tesla v100, cuda9.0, cudnn7
-
训练信息 1)单机
-
问题描述:
网络: [X, Y] -> score loss:triplet loss,[ X, Y+, Y- ] 其中Y为ResNet50,
通过以下方式设置参数固定
conv = fluid.layers.conv2d(..., param_attr=fluid.param_attr.ParamAttr(name=name + "_weights", trainable=False),...)
报错信息:
paddle.fluid.core_avx.EnforceNotMet: Cannot find variable bn4a_branch2c_scale@GRAD at [/paddle/paddle/fluid/framework/ir/memory_optimize_pass/memory_reuse_pass.cc:269]
PaddlePaddle Call Stacks:
0 0x7f5cf9af3e40p void paddle::platform::EnforceNotMet::Init<char const*>(char const*, char const*, int) + 352
1 0x7f5cf9af41b9p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) + 137
2 0x7f5cfb8cf223p paddle::framework::ir::MemoryReusePass::UpdateLastLiveOpOfVar(paddle::framework::details::ComputationOpHandle*, paddle::framework::details::VarHandle*, paddle::framework::details::VarHandle*) const + 835
3 0x7f5cfb8cf6c9p paddle::framework::ir::MemoryReusePass::AddReuseVar(paddle::framework::details::ComputationOpHandle*, paddle::framework::details::VarHandle*, paddle::framework::details::VarHandle*) const + 697
4 0x7f5cfb8cf92bp paddle::framework::ir::MemoryReusePass::TryReuseVar(paddle::framework::details::VarHandle*, paddle::framework::details::VarHandle*) const + 107
5 0x7f5cfb8ca914p paddle::framework::ir::BufferSharedInplaceOpPass::Run(paddle::framework::ir::Graph*) const + 2356
6 0x7f5cfb8ceb67p paddle::framework::ir::MemoryReusePass::ApplyImpl(paddle::framework::ir::Graph*) const + 407
7 0x7f5cfbabd6c1p paddle::framework::ir::Pass::Apply(paddle::framework::ir::Graph*) const + 209
8 0x7f5cf9cda652p paddle::framework::ParallelExecutorPrivate::ApplyMemoryOptimizePass(paddle::framework::ir::Graph*) + 834
9 0x7f5cf9cdc044p paddle::framework::ParallelExecutor::ParallelExecutor(std::vector<boost::variant<paddle::platform::CUDAPlace