File tree 1 file changed +11
-7
lines changed
tensorflow_graphics/rendering
1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
"""Storage classes for framebuffers and related data."""
15
15
16
+ import dataclasses
16
17
from typing import Dict , Optional
17
18
18
- import dataclasses
19
19
import tensorflow as tf
20
20
21
21
@@ -51,14 +51,18 @@ def __post_init__(self):
51
51
52
52
same_as_value = True
53
53
static_shapes = [self .value .shape ]
54
- if self .d_dx is not None :
54
+ d_dx = self .d_dx
55
+ if d_dx is not None :
55
56
same_as_value = tf .logical_and (
56
- same_as_value , tf .equal (tf .shape (self .value ), tf .shape (self .d_dx )))
57
- static_shapes .append (self .d_dx .shape )
58
- if self .d_dy is not None :
57
+ same_as_value , tf .equal (tf .shape (self .value ), tf .shape (d_dx ))
58
+ )
59
+ static_shapes .append (d_dx .shape )
60
+ d_dy = self .d_dy
61
+ if d_dy is not None :
59
62
same_as_value = tf .logical_and (
60
- same_as_value , tf .equal (tf .shape (self .value ), tf .shape (self .d_dy )))
61
- static_shapes .append (self .d_dy .shape )
63
+ same_as_value , tf .equal (tf .shape (self .value ), tf .shape (d_dy ))
64
+ )
65
+ static_shapes .append (d_dy .shape )
62
66
tf .debugging .assert_equal (
63
67
same_as_value ,
64
68
True ,
You can’t perform that action at this time.
0 commit comments