本文整理汇总了Python中tensorflow.python.ops.gen_nn_ops._elu_grad方法的典型用法代码示例。如果您正苦于以下问题:Python gen_nn_ops._elu_grad方法的具体用法?Python gen_nn_ops._elu_grad怎么用?Python gen_nn_ops._elu_grad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tensorflow.python.ops.gen_nn_ops
的用法示例。
在下文中一共展示了gen_nn_ops._elu_grad方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _EluGradGrad
# 需要导入模块: from tensorflow.python.ops import gen_nn_ops [as 别名]
# 或者: from tensorflow.python.ops.gen_nn_ops import _elu_grad [as 别名]
def _EluGradGrad(op, grad):
x = op.inputs[1]
return (gen_nn_ops._elu_grad(grad, op.outputs[0]),
array_ops.where(
x < 0., gen_nn_ops._elu_grad(grad, op.outputs[0] + 1),
array_ops.zeros(shape=array_ops.shape(x), dtype=x.dtype)))
示例2: _EluGrad
# 需要导入模块: from tensorflow.python.ops import gen_nn_ops [as 别名]
# 或者: from tensorflow.python.ops.gen_nn_ops import _elu_grad [as 别名]
def _EluGrad(op, grad):
return gen_nn_ops._elu_grad(grad, op.outputs[0])
示例3: _EluGradGrad
# 需要导入模块: from tensorflow.python.ops import gen_nn_ops [as 别名]
# 或者: from tensorflow.python.ops.gen_nn_ops import _elu_grad [as 别名]
def _EluGradGrad(op, grad):
x = op.inputs[1]
return (gen_nn_ops._elu_grad(grad, op.outputs[0]),
array_ops.where(
x < 0., gen_nn_ops._elu_grad(grad, op.outputs[0] + 1),
array_ops.zeros(shape = array_ops.shape(x), dtype = x.dtype)))
示例4: _EluGradGrad
# 需要导入模块: from tensorflow.python.ops import gen_nn_ops [as 别名]
# 或者: from tensorflow.python.ops.gen_nn_ops import _elu_grad [as 别名]
def _EluGradGrad(op, grad):
x = op.inputs[1]
return (gen_nn_ops._elu_grad(grad, op.outputs[0]),
gen_math_ops.select(x < 0., gen_nn_ops._elu_grad(grad, op.outputs[0] + 1),
array_ops.zeros(shape = array_ops.shape(x), dtype = x.dtype)))
示例5: _guided_grad_elu
# 需要导入模块: from tensorflow.python.ops import gen_nn_ops [as 别名]
# 或者: from tensorflow.python.ops.gen_nn_ops import _elu_grad [as 别名]
def _guided_grad_elu(op, grad):
return guided_grad(gen_nn_ops._elu_grad(grad, op.outputs[0]))
示例6: _EluGradGrad
# 需要导入模块: from tensorflow.python.ops import gen_nn_ops [as 别名]
# 或者: from tensorflow.python.ops.gen_nn_ops import _elu_grad [as 别名]
def _EluGradGrad(op, grad):
elu_x = op.inputs[1]
return (gen_nn_ops._elu_grad(grad, op.outputs[0]),
array_ops.where(elu_x < 0,
grad * op.inputs[0],
array_ops.zeros(shape=array_ops.shape(elu_x),
dtype=elu_x.dtype)))
开发者ID:PacktPublishing,项目名称:Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda,代码行数:9,代码来源:nn_grad.py
示例7: _SeluGradGrad
# 需要导入模块: from tensorflow.python.ops import gen_nn_ops [as 别名]
# 或者: from tensorflow.python.ops.gen_nn_ops import _elu_grad [as 别名]
def _SeluGradGrad(op, grad):
x = op.inputs[1]
scale_alpha = 1.7580993408473768599402175208123
return (gen_nn_ops._elu_grad(grad, op.outputs[0]),
array_ops.where(
x < 0., gen_nn_ops._elu_grad(grad, op.outputs[0] + scale_alpha),
array_ops.zeros(shape=array_ops.shape(x), dtype=x.dtype)))
开发者ID:PacktPublishing,项目名称:Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda,代码行数:9,代码来源:nn_grad.py