Python object_detection.utils.ops.fixed_padding() Examples
The following are 30
code examples of object_detection.utils.ops.fixed_padding().
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
object_detection.utils.ops
, or try the search function
.
Example #1
Source File: ops_test.py From open-solution-googleai-object-detection with MIT License | 5 votes |
def test_5x5_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 5) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #2
Source File: ops_test.py From vehicle_counting_tensorflow with MIT License | 5 votes |
def test_3x3_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 4, 4, 1), padded_tensor_out.shape)
Example #3
Source File: ops_test.py From Elphas with Apache License 2.0 | 5 votes |
def test_3x3_atrous_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3, 2) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #4
Source File: ops_test.py From monopsr with MIT License | 5 votes |
def test_3x3_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 4, 4, 1), padded_tensor_out.shape)
Example #5
Source File: ops_test.py From monopsr with MIT License | 5 votes |
def test_5x5_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 5) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #6
Source File: ops_test.py From monopsr with MIT License | 5 votes |
def test_3x3_atrous_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3, 2) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #7
Source File: ops_test.py From AniSeg with Apache License 2.0 | 5 votes |
def test_3x3_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 4, 4, 1), padded_tensor_out.shape)
Example #8
Source File: ops_test.py From AniSeg with Apache License 2.0 | 5 votes |
def test_5x5_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 5) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #9
Source File: ops_test.py From AniSeg with Apache License 2.0 | 5 votes |
def test_3x3_atrous_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3, 2) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #10
Source File: ops_test.py From MAX-Object-Detector with Apache License 2.0 | 5 votes |
def test_3x3_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 4, 4, 1), padded_tensor_out.shape)
Example #11
Source File: ops_test.py From MAX-Object-Detector with Apache License 2.0 | 5 votes |
def test_5x5_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 5) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #12
Source File: ops_test.py From MAX-Object-Detector with Apache License 2.0 | 5 votes |
def test_3x3_atrous_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3, 2) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #13
Source File: mobilenet_v2.py From MAX-Object-Detector with Apache License 2.0 | 5 votes |
def _FixedPaddingLayer(self, kernel_size): return tf.keras.layers.Lambda(lambda x: ops.fixed_padding(x, kernel_size))
Example #14
Source File: ops_test.py From open-solution-googleai-object-detection with MIT License | 5 votes |
def test_3x3_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 4, 4, 1), padded_tensor_out.shape)
Example #15
Source File: ops_test.py From Elphas with Apache License 2.0 | 5 votes |
def test_5x5_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 5) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #16
Source File: ops_test.py From open-solution-googleai-object-detection with MIT License | 5 votes |
def test_3x3_atrous_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3, 2) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #17
Source File: ops_test.py From g-tensorflow-models with Apache License 2.0 | 5 votes |
def test_3x3_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 4, 4, 1), padded_tensor_out.shape)
Example #18
Source File: ops_test.py From g-tensorflow-models with Apache License 2.0 | 5 votes |
def test_5x5_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 5) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #19
Source File: ops_test.py From g-tensorflow-models with Apache License 2.0 | 5 votes |
def test_3x3_atrous_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3, 2) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #20
Source File: mobilenet_v2.py From g-tensorflow-models with Apache License 2.0 | 5 votes |
def _FixedPaddingLayer(self, kernel_size): return tf.keras.layers.Lambda(lambda x: ops.fixed_padding(x, kernel_size))
Example #21
Source File: ops_test.py From models with Apache License 2.0 | 5 votes |
def test_3x3_kernel(self): def graph_fn(): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3) return padded_tensor padded_tensor_out = self.execute(graph_fn, []) self.assertEqual((1, 4, 4, 1), padded_tensor_out.shape)
Example #22
Source File: ops_test.py From models with Apache License 2.0 | 5 votes |
def test_5x5_kernel(self): def graph_fn(): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 5) return padded_tensor padded_tensor_out = self.execute(graph_fn, []) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #23
Source File: ops_test.py From models with Apache License 2.0 | 5 votes |
def test_3x3_atrous_kernel(self): def graph_fn(): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3, 2) return padded_tensor padded_tensor_out = self.execute(graph_fn, []) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #24
Source File: mobilenet_v2.py From models with Apache License 2.0 | 5 votes |
def _FixedPaddingLayer(self, kernel_size): return tf.keras.layers.Lambda(lambda x: ops.fixed_padding(x, kernel_size))
Example #25
Source File: ops_test.py From multilabel-image-classification-tensorflow with MIT License | 5 votes |
def test_3x3_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 4, 4, 1), padded_tensor_out.shape)
Example #26
Source File: ops_test.py From multilabel-image-classification-tensorflow with MIT License | 5 votes |
def test_5x5_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 5) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #27
Source File: ops_test.py From multilabel-image-classification-tensorflow with MIT License | 5 votes |
def test_3x3_atrous_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3, 2) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)
Example #28
Source File: mobilenet_v2.py From multilabel-image-classification-tensorflow with MIT License | 5 votes |
def _FixedPaddingLayer(self, kernel_size): return tf.keras.layers.Lambda(lambda x: ops.fixed_padding(x, kernel_size))
Example #29
Source File: ops_test.py From Gun-Detector with Apache License 2.0 | 5 votes |
def test_3x3_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 3) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 4, 4, 1), padded_tensor_out.shape)
Example #30
Source File: ops_test.py From vehicle_counting_tensorflow with MIT License | 5 votes |
def test_5x5_kernel(self): tensor = tf.constant([[[[0.], [0.]], [[0.], [0.]]]]) padded_tensor = ops.fixed_padding(tensor, 5) with self.test_session() as sess: padded_tensor_out = sess.run(padded_tensor) self.assertEqual((1, 6, 6, 1), padded_tensor_out.shape)