import tensorflow as tf

        def batch_shaped(t):
            return graph_typecheck.assert_shape(t, [batch_size])

        def batch_win_shaped(t):
            return graph_typecheck.assert_shape(t, [batch_size, window_size])

        def batch_2win_shaped(t):
            return graph_typecheck.assert_shape(t, [batch_size, 2 * window_size])

        def tile_to_2win(t):
            return tf.tile(tf.expand_dims(t, 1), [1, 2 * window_size])

        closest_time = batch_shaped(band_features['closest_time_in_band'])
        closest_flux = batch_shaped(band_features['closest_flux_in_band'])
        self.in_window = tf.less(
            batch_shaped(band_features["closest_time_diff"]), band_time_diff
        )

        # Before and after flux.
        before_flux = batch_win_shaped(band_features["before_flux"])
