Skip to content

Commit

Permalink
Internal change.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 554938856
  • Loading branch information
tensorflower-gardener authored and copybara-github committed Aug 8, 2023
1 parent c73181a commit 1b0203e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tensorflow_graphics/rendering/framebuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# limitations under the License.
"""Storage classes for framebuffers and related data."""

import dataclasses
from typing import Dict, Optional

import dataclasses
import tensorflow as tf


Expand Down Expand Up @@ -51,14 +51,18 @@ def __post_init__(self):

same_as_value = True
static_shapes = [self.value.shape]
if self.d_dx is not None:
d_dx = self.d_dx
if d_dx is not None:
same_as_value = tf.logical_and(
same_as_value, tf.equal(tf.shape(self.value), tf.shape(self.d_dx)))
static_shapes.append(self.d_dx.shape)
if self.d_dy is not None:
same_as_value, tf.equal(tf.shape(self.value), tf.shape(d_dx))
)
static_shapes.append(d_dx.shape)
d_dy = self.d_dy
if d_dy is not None:
same_as_value = tf.logical_and(
same_as_value, tf.equal(tf.shape(self.value), tf.shape(self.d_dy)))
static_shapes.append(self.d_dy.shape)
same_as_value, tf.equal(tf.shape(self.value), tf.shape(d_dy))
)
static_shapes.append(d_dy.shape)
tf.debugging.assert_equal(
same_as_value,
True,
Expand Down

0 comments on commit 1b0203e

Please sign in to comment.