We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8364688 commit 565b19bCopy full SHA for 565b19b
paddle/fluid/imperative/layer.h
@@ -195,7 +195,7 @@ class VarBase {
195
// data type. e.g.. FP32
196
inline void SetDataType(framework::proto::VarType::Type type) {
197
auto tensor = var_->GetMutable<framework::LoDTensor>();
198
- tensor->mutable_data(place_, type);
+ tensor->mutable_data(tensor->place(), type);
199
}
200
inline framework::proto::VarType::Type DataType() const {
201
auto tensor = var_->Get<framework::LoDTensor>();
0 commit comments