Python tensorflow.python.ops.gen_image_ops._resize_bilinear_grad() Examples
The following are 5
code examples of tensorflow.python.ops.gen_image_ops._resize_bilinear_grad().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
tensorflow.python.ops.gen_image_ops
, or try the search function
.
Example #1
Source File: image_grad.py From lambda-packs with MIT License | 6 votes |
def _ResizeBilinearGrad(op, grad): """The derivatives for bilinear resizing. Args: op: The ResizeBilinear op. grad: The tensor representing the gradient w.r.t. the output. Returns: The gradients w.r.t. the input. """ allowed_types = [dtypes.float32, dtypes.float64] grad0 = None if op.inputs[0].dtype in allowed_types: # pylint: disable=protected-access grad0 = gen_image_ops._resize_bilinear_grad( grad, op.inputs[0], align_corners=op.get_attr("align_corners")) # pylint: enable=protected-access return [grad0, None]
Example #2
Source File: image_grad.py From auto-alt-text-lambda-api with MIT License | 6 votes |
def _ResizeBilinearGrad(op, grad): """The derivatives for bilinear resizing. Args: op: The ResizeBilinear op. grad: The tensor representing the gradient w.r.t. the output. Returns: The gradients w.r.t. the input. """ allowed_types = [dtypes.float32, dtypes.float64] grad0 = None if op.inputs[0].dtype in allowed_types: # pylint: disable=protected-access grad0 = gen_image_ops._resize_bilinear_grad( grad, op.inputs[0], align_corners=op.get_attr("align_corners")) # pylint: enable=protected-access return [grad0, None]
Example #3
Source File: image_grad.py From deep_image_model with Apache License 2.0 | 6 votes |
def _ResizeBilinearGrad(op, grad): """The derivatives for bilinear resizing. Args: op: The ResizeBilinear op. grad: The tensor representing the gradient w.r.t. the output. Returns: The gradients w.r.t. the input. """ allowed_types = [dtypes.float32, dtypes.float64] grad0 = None if op.inputs[0].dtype in allowed_types: # pylint: disable=protected-access grad0 = gen_image_ops._resize_bilinear_grad( grad, op.inputs[0], align_corners=op.get_attr("align_corners")) # pylint: enable=protected-access return [grad0, None]
Example #4
Source File: image_grad.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 6 votes |
def _ResizeBilinearGrad(op, grad): """The derivatives for bilinear resizing. Args: op: The ResizeBilinear op. grad: The tensor representing the gradient w.r.t. the output. Returns: The gradients w.r.t. the input. """ allowed_types = [dtypes.float32, dtypes.float64] grad0 = None if op.inputs[0].dtype in allowed_types: # pylint: disable=protected-access grad0 = gen_image_ops._resize_bilinear_grad( grad, op.inputs[0], align_corners=op.get_attr("align_corners")) # pylint: enable=protected-access return [grad0, None]
Example #5
Source File: image_grad.py From keras-lambda with MIT License | 6 votes |
def _ResizeBilinearGrad(op, grad): """The derivatives for bilinear resizing. Args: op: The ResizeBilinear op. grad: The tensor representing the gradient w.r.t. the output. Returns: The gradients w.r.t. the input. """ allowed_types = [dtypes.float32, dtypes.float64] grad0 = None if op.inputs[0].dtype in allowed_types: # pylint: disable=protected-access grad0 = gen_image_ops._resize_bilinear_grad( grad, op.inputs[0], align_corners=op.get_attr("align_corners")) # pylint: enable=protected-access return [grad0, None]