Python tensorflow.python.ops.nn_ops.conv3d() Examples
The following are 11
code examples of tensorflow.python.ops.nn_ops.conv3d().
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.nn_ops
, or try the search function
.
Example #1
Source File: nn_grad.py From lambda-packs with MIT License | 5 votes |
def _Conv3DBackpropInputGrad(op, grad): data_format = op.get_attr("data_format") return [None, nn_ops.conv3d_backprop_filter_v2(grad, array_ops.shape(op.inputs[1]), op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding"), data_format=data_format), nn_ops.conv3d(grad, op.inputs[1], strides=op.get_attr("strides"), padding=op.get_attr("padding"), data_format=data_format)]
Example #2
Source File: nn_grad.py From lambda-packs with MIT License | 5 votes |
def _Conv3DBackpropFilterGrad(op, grad): data_format = op.get_attr("data_format") return [nn_ops.conv3d_backprop_input_v2(array_ops.shape(op.inputs[0]), grad, op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding"), data_format=data_format), None, nn_ops.conv3d(op.inputs[0], grad, strides=op.get_attr("strides"), padding=op.get_attr("padding"), data_format=data_format)]
Example #3
Source File: nn_grad.py From auto-alt-text-lambda-api with MIT License | 5 votes |
def _Conv3DBackpropInputGrad(op, grad): return [None, nn_ops.conv3d_backprop_filter_v2(grad, array_ops.shape(op.inputs[1]), op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding")), nn_ops.conv3d(grad, op.inputs[1], strides=op.get_attr("strides"), padding=op.get_attr("padding"))]
Example #4
Source File: nn_grad.py From auto-alt-text-lambda-api with MIT License | 5 votes |
def _Conv3DBackpropFilterGrad(op, grad): return [nn_ops.conv3d_backprop_input_v2(array_ops.shape(op.inputs[0]), grad, op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding")), None, nn_ops.conv3d(op.inputs[0], grad, strides=op.get_attr("strides"), padding=op.get_attr("padding"))]
Example #5
Source File: nn_grad.py From deep_image_model with Apache License 2.0 | 5 votes |
def _Conv3DBackpropInputGrad(op, grad): return [None, nn_ops.conv3d_backprop_filter_v2(grad, array_ops.shape(op.inputs[1]), op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding")), nn_ops.conv3d(grad, op.inputs[1], strides=op.get_attr("strides"), padding=op.get_attr("padding"))]
Example #6
Source File: nn_grad.py From deep_image_model with Apache License 2.0 | 5 votes |
def _Conv3DBackpropFilterGrad(op, grad): return [nn_ops.conv3d_backprop_input_v2(array_ops.shape(op.inputs[0]), grad, op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding")), None, nn_ops.conv3d(op.inputs[0], grad, strides=op.get_attr("strides"), padding=op.get_attr("padding"))]
Example #7
Source File: test_forward.py From incubator-tvm with Apache License 2.0 | 5 votes |
def _test_convolution3d(opname, tensor_in_sizes, filter_in_sizes, dilations, strides, padding, data_format, deconv_output_shape=[]): """ One iteration of 3D convolution with given shapes and attributes """ total_size_1 = np.prod(tensor_in_sizes) total_size_2 = np.prod(filter_in_sizes) # Initializes the input tensor with array containing incrementing # numbers from 1. data_array = [f * 1.0 for f in range(1, total_size_1 + 1)] filter_array = [f * 1.0 for f in range(1, total_size_2 + 1)] with tf.Graph().as_default(): in_data = array_ops.placeholder(shape=tensor_in_sizes, dtype='float32') in_filter = constant_op.constant( filter_array, shape=filter_in_sizes, dtype='float32') if data_format == 'NDHWC': strides = [1] + strides + [1] dilations = [1] + dilations + [1] else: strides = [1, 1] + strides dilations = [1, 1] + dilations if opname == 'conv': nn_ops.conv3d(in_data, in_filter, strides=strides, dilations=dilations, padding=padding, data_format=data_format) compare_tf_with_tvm(np.reshape(data_array, tensor_in_sizes).astype('float32'), 'Placeholder:0', 'Conv3D:0', cuda_layout="NCDHW")
Example #8
Source File: nn_grad.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def _Conv3DBackpropInputGrad(op, grad): data_format = op.get_attr("data_format") return [None, nn_ops.conv3d_backprop_filter_v2(grad, array_ops.shape(op.inputs[1]), op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding"), data_format=data_format), nn_ops.conv3d(grad, op.inputs[1], strides=op.get_attr("strides"), padding=op.get_attr("padding"), data_format=data_format)]
Example #9
Source File: nn_grad.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def _Conv3DBackpropFilterGrad(op, grad): data_format = op.get_attr("data_format") return [nn_ops.conv3d_backprop_input_v2(array_ops.shape(op.inputs[0]), grad, op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding"), data_format=data_format), None, nn_ops.conv3d(op.inputs[0], grad, strides=op.get_attr("strides"), padding=op.get_attr("padding"), data_format=data_format)]
Example #10
Source File: nn_grad.py From keras-lambda with MIT License | 5 votes |
def _Conv3DBackpropInputGrad(op, grad): return [None, nn_ops.conv3d_backprop_filter_v2(grad, array_ops.shape(op.inputs[1]), op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding")), nn_ops.conv3d(grad, op.inputs[1], strides=op.get_attr("strides"), padding=op.get_attr("padding"))]
Example #11
Source File: nn_grad.py From keras-lambda with MIT License | 5 votes |
def _Conv3DBackpropFilterGrad(op, grad): return [nn_ops.conv3d_backprop_input_v2(array_ops.shape(op.inputs[0]), grad, op.inputs[2], strides=op.get_attr("strides"), padding=op.get_attr("padding")), None, nn_ops.conv3d(op.inputs[0], grad, strides=op.get_attr("strides"), padding=op.get_attr("padding"))]