Skip to content

Commit 2fd2753

Browse files
[π˜€π—½π—Ώ] changes introduced through rebase
Created using spr 1.3.4 [skip ci]
1 parent 82408ef commit 2fd2753

4 files changed

Lines changed: 1 addition & 1979 deletions

File tree

β€ŽWORKSPACEβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,8 @@ _pybind11_python_configure(
181181

182182
git_repository(
183183
name = "sonnet_repo",
184-
commit = "cd5b5fa48e15e4d020f744968f5209949ebe750f",
184+
commit = "c99b49136210c30fd95bd9c6350fcc3eaf9a72f3",
185185
patch_args = ["-p1"],
186-
patches = ["//:sonnet.patch"],
187186
remote = "https://github.com/deepmind/sonnet.git",
188187
)
189188

β€Žgematria/model/python/model_blocks.pyβ€Ž

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,3 @@ def call(self, layer_inputs: tuple[tf.Tensor, tf.Tensor]) -> tf.Tensor:
7878
residual_part = self._linear_transformation(residual_part)
7979

8080
return tf.math.add(output_part, residual_part, name=self.name)
81-
82-
83-
def cast(dtype: tf.dtypes.DType) -> snt.AbstractModule:
84-
"""Creates a sonnet module that casts a tensor to the specified dtype."""
85-
return snt.Module(build=functools.partial(tf.cast, dtype=dtype))

β€Žgematria/model/python/model_blocks_test.pyβ€Ž

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,5 @@ def test_different_shapes(self):
6565
self.assertNotAllClose(output_tensor, input_tensor)
6666

6767

68-
class CastTest(tf.test.TestCase):
69-
70-
def test_int32_to_float_cast(self):
71-
input_shape = (4, 24)
72-
input_dtype = tf.dtypes.int32
73-
output_dtype = tf.dtypes.float32
74-
input_tensor = tf.ones(input_shape, input_dtype)
75-
cast = model_blocks.cast(output_dtype)
76-
output_tensor = cast(input_tensor)
77-
78-
self.assertEqual(output_tensor.shape, input_shape)
79-
self.assertEqual(output_tensor.dtype, output_dtype)
80-
81-
8268
if __name__ == '__main__':
8369
tf.test.main()

0 commit comments

Comments
Β (0)