File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -150,13 +150,12 @@ class HierarchicalSigmoidGradOp : public framework::OperatorWithKernel {
150
150
" Output(W@Grad should not be null." );
151
151
PADDLE_ENFORCE (ctx->HasOutput (framework::GradVarName (" X" )),
152
152
" Output(X@Grad should not be null." );
153
- if (!ctx->Attrs ().Get <bool >(" is_sparse" )) {
154
- if (ctx->HasOutput (framework::GradVarName (" Bias" ))) {
155
- ctx->SetOutputDim (framework::GradVarName (" Bias" ),
156
- ctx->GetInputDim (" Bias" ));
157
- }
158
- ctx->SetOutputDim (framework::GradVarName (" W" ), ctx->GetInputDim (" W" ));
153
+
154
+ if (ctx->HasOutput (framework::GradVarName (" Bias" ))) {
155
+ ctx->SetOutputDim (framework::GradVarName (" Bias" ),
156
+ ctx->GetInputDim (" Bias" ));
159
157
}
158
+ ctx->SetOutputDim (framework::GradVarName (" W" ), ctx->GetInputDim (" W" ));
160
159
ctx->SetOutputDim (framework::GradVarName (" X" ), ctx->GetInputDim (" X" ));
161
160
}
162
161
You can’t perform that action at this time.
0 commit comments