🚨🚨🚨 Fix sdpa in SAM and refactor relative position embeddings (#36422)
* fall back to eager if output_attentions * improve relative position embeddings * run modular on got_ocr2 * run-slow: sam * fix run-length encoding * fix tf processor errors * update tf_sam * fix compile error * re-run tests
This commit is contained in:
@@ -312,7 +312,7 @@ class TFSamProcessorTest(unittest.TestCase):
|
||||
# This is shape (1, 2, 2).
|
||||
# Flattened in Fortran order -> [0, 1, 1, 1].
|
||||
# The RLE for [0,1,1,1] is [1, 3].
|
||||
input_mask = tf.tensor([[[0, 1], [1, 1]]], dtype=tf.int64)
|
||||
input_mask = tf.constant([[[0, 1], [1, 1]]], dtype=tf.int64)
|
||||
rle = _mask_to_rle_tf(input_mask)
|
||||
|
||||
self.assertEqual(len(rle), 1)
|
||||
|
||||
Reference in New Issue
Block a user