From f83739499c9d43fa4260884ad79de8d91f87c841 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Thu, 14 Mar 2019 14:57:58 +0800 Subject: [PATCH] Polish code test=develop --- paddle/fluid/imperative/tracer.h | 4 ---- python/paddle/fluid/framework.py | 4 ---- python/paddle/fluid/imperative/nn.py | 3 --- 3 files changed, 11 deletions(-) diff --git a/paddle/fluid/imperative/tracer.h b/paddle/fluid/imperative/tracer.h index 62d8eecfc..7b65d55e9 100644 --- a/paddle/fluid/imperative/tracer.h +++ b/paddle/fluid/imperative/tracer.h @@ -56,10 +56,6 @@ class Tracer { std::vector PyTrace(OpBase* op, const std::vector& inputs, bool stop_gradient = false); - static void StartProfile(); - - static void StopProfile(); - private: platform::Place GetPlace(const VarBasePtrMap& inputs); diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 3fcea010d..5b9dd8693 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -290,7 +290,6 @@ class Variable(object): dtype='float32') """ - # @profile def __init__(self, block, type=core.VarDesc.VarType.LOD_TENSOR, @@ -646,7 +645,6 @@ class Operator(object): 'checkpoint_notify', 'gen_nccl_id' } - # @profile def __init__(self, block, desc, @@ -1241,7 +1239,6 @@ class Block(object): return (item[1] for item in six.iteritems(self.vars) if isinstance(item[1], Parameter)) - # @profile def create_var(self, *args, **kwargs): var = Variable(block=self, *args, **kwargs) if 'initializer' in kwargs: @@ -1350,7 +1347,6 @@ class Block(object): initializer(param, self) return param - # @profile def append_op(self, *args, **kwargs): """ Appends a new Operator according to the giving arguments. diff --git a/python/paddle/fluid/imperative/nn.py b/python/paddle/fluid/imperative/nn.py index 07a690e70..bf3f7ce52 100644 --- a/python/paddle/fluid/imperative/nn.py +++ b/python/paddle/fluid/imperative/nn.py @@ -97,7 +97,6 @@ class Conv2D(layers.Layer): dtype=self._dtype, is_bias=True) - # @profile def forward(self, input): pre_bias = self._helper.create_variable_for_type_inference( dtype=self._dtype) @@ -170,7 +169,6 @@ class Pool2D(layers.Layer): self._exclusive = exclusive self._l_type = 'pool2d' - # @profile def forward(self, input): pool_out = self._helper.create_variable_for_type_inference(self._dtype) @@ -231,7 +229,6 @@ class FC(layers.Layer): else: self._b = None - # @profile def forward(self, input): tmp = self._helper.create_variable_for_type_inference(self._dtype) self._helper.append_op( -- GitLab