import tensorflow as tf


    def conv_3d_op(
            self,
            data,
            weights,
            strides,
            symmetric_weights=False,
            dilations=None):
        """3D convolutions for hgru."""
        if dilations is None:
            dilations = [1, 1, 1, 1, 1]
        w_shape = [int(w) for w in weights.get_shape()]
        if len(w_shape) > 1 and int(w_shape[-2]) > 1:
            # Full convolutions
            if symmetric_weights:
                g = tf.get_default_graph()
                with g.gradient_override_map({'Conv3D': 'SymmetricConv3D'}):
                    activities = tf.nn.conv3d(
                        data,
                        weights,
                        strides,
                        padding=self.padding)
                        # TODO (jk): removed dilations=dilations to accommodate r1.4
            else:
                activities = tf.nn.conv3d(
                    data,
                    weights,
                    strides,
                    padding=self.padding)
                    # TODO (jk): removed dilations=dilations to accommodate r1.4
