File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
tensorflow_graphics/rendering Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 1313# limitations under the License.
1414"""Storage classes for framebuffers and related data."""
1515
16+ import dataclasses
1617from typing import Dict , Optional
1718
18- import dataclasses
1919import tensorflow as tf
2020
2121
@@ -51,14 +51,18 @@ def __post_init__(self):
5151
5252 same_as_value = True
5353 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 :
5556 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 :
5962 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 )
6266 tf .debugging .assert_equal (
6367 same_as_value ,
6468 True ,
You can’t perform that action at this time.
0 commit comments