From 9e523ef64928df0184c3a8fd9435185ade4dac57 Mon Sep 17 00:00:00 2001 From: liaogang Date: Fri, 28 Jul 2017 11:41:07 +0800 Subject: [PATCH] FIX: order matter in Linux ! --- paddle/framework/tensor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/framework/tensor.h b/paddle/framework/tensor.h index 2edc981cd..039ab0837 100644 --- a/paddle/framework/tensor.h +++ b/paddle/framework/tensor.h @@ -132,10 +132,10 @@ class Tensor { template struct PlaceholderImpl : public Placeholder { PlaceholderImpl(Place place, size_t size) - : place_(place), - size_(size), - ptr_(static_cast(memory::Alloc(place, size)), - memory::PODDeleter(place)) { + : ptr_(static_cast(memory::Alloc(place, size)), + memory::PODDeleter(place)), + place_(place), + size_(size) { PADDLE_ENFORCE(ptr_ != nullptr, "Insufficient %s memory to allocation.", is_cpu_place(place_) ? "CPU" : "GPU"); } -- GitLab