提交 f8373949 编写于 作者: M minqiyang

Polish code

test=develop
上级 7355d418
......@@ -56,10 +56,6 @@ class Tracer {
std::vector<VarBase*> PyTrace(OpBase* op, const std::vector<VarBase*>& inputs,
bool stop_gradient = false);
static void StartProfile();
static void StopProfile();
private:
platform::Place GetPlace(const VarBasePtrMap& inputs);
......
......@@ -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.
......
......@@ -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(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册