# Path: ldif/util/math_util.py
# def int_log2(i):
# def nonzero_mean(tensor):
# def increase_frequency(t, out_dim, flatten=False, interleave=True):


import numpy as np
import tensorflow as tf
import tensorflow.contrib.layers as contrib_layers
from ldif.util import math_util
      networks.
    nerfify: Whether to apply the math_util.nerfify function to the features
      (all of them, not just the points) after the initial transform step.
    maxpool_feature_count: Integer. The number of features in the vector before
      doing a global maxpool. This is the main computational bottleneck, so
      reducing it is good for training time.
    use_gpu: Whether to assume a GPU is available.

  Returns:
    embedding: Tensor with shape [batch_size, embedding_length].
  """
  batch_size, point_count, feature_count = points.get_shape().as_list()

  point_positions = points[..., 0:3]
  point_features = points[..., 3:]
  feature_count = points.get_shape().as_list()[-1] - 3
  with tf.variable_scope('pointnet', reuse=tf.AUTO_REUSE):
    if apply_learned_ortho_tx:
      with tf.variable_scope('learned_transformation'):
        transformation, translation = point_set_to_transformation(points)
        transformed_points = tf.matmul(point_positions + translation,
                                       transformation)
        if feature_count > 0:
          transformed_points = tf.concat([transformed_points, point_features],
                                         axis=2)
          points = transformed_points
    # Go from NWC to NCW so that the final reduce can be faster.
    assert len(points.shape) == 3
    net = points
    if nerfify:

# Path: ldif/util/math_util.py
# def int_log2(i):
# def nonzero_mean(tensor):
# def increase_frequency(t, out_dim, flatten=False, interleave=True):


# Path: ldif/nets/pointnet.py
import numpy as np
import tensorflow as tf
import tensorflow.contrib.layers as contrib_layers
from ldif.util import math_util

      networks.
    nerfify: Whether to apply the math_util.nerfify function to the features
      (all of them, not just the points) after the initial transform step.
    maxpool_feature_count: Integer. The number of features in the vector before
      doing a global maxpool. This is the main computational bottleneck, so
      reducing it is good for training time.
    use_gpu: Whether to assume a GPU is available.

  Returns:
    embedding: Tensor with shape [batch_size, embedding_length].
  """
  batch_size, point_count, feature_count = points.get_shape().as_list()

  point_positions = points[..., 0:3]
  point_features = points[..., 3:]
  feature_count = points.get_shape().as_list()[-1] - 3
  with tf.variable_scope('pointnet', reuse=tf.AUTO_REUSE):
    if apply_learned_ortho_tx:
      with tf.variable_scope('learned_transformation'):
        transformation, translation = point_set_to_transformation(points)
        transformed_points = tf.matmul(point_positions + translation,
                                       transformation)
        if feature_count > 0:
          transformed_points = tf.concat([transformed_points, point_features],
                                         axis=2)
          points = transformed_points
    # Go from NWC to NCW so that the final reduce can be faster.
    assert len(points.shape) == 3
    net = points
    if nerfify:

      net = math_util.nerfify(net, 10, flatten=True, interleave=False)