# Path: ops/fops.py
# def shuttleNet(inputs, n_steps, num_mem, mem_dim,
#             num_round,
#             echocell,
#             lstm_type="encell",
#             activation=tf.tanh,
#             num_frames=None,
#             scope=None,
#             reuse=None):
#     def __init__(self, batch_size, mem_size, mem_dim, name,
#                  activation=tanh, dummy_value=0.0, stddev=0.5):
#     def dlinear(self, input_, output_size, stddev=0.5,
#                         is_range=False, squeeze=False,
#                         name=None, reuse=None):
#                 def identity_initializer(tensor):
#                     def _initializer(shape, dtype=tf.float32):
#     def state_size(self):
#     def output_size(self):
#     def unbalance_linear(self, args, output_size, bias, bias_start=0.0, scope=None):
#     def __call__(self, inputs, state, scope=None):
#     def __init__(self, batch_size, num_mem, num_round, input_offset,
#                  cell=None,
#                  echocell=None,
#                  mem_size=2,
#                  mem_dim=1024,
#                  activation=tanh,
#                  dummy_value=0.0):
#     def state_size(self):
#     def output_size(self):
#     def __call__(self, inputs, state, scope=None):
# def att_weight(decoder_inputs, attention_states,
#                echocell=None,
#                scope=None):
# def lstm(inputs, n_steps, num_units,
#         is_training=True,
#         num_frames=None,
#         lstm_type="GRU",
#         keep_prob=1.0,
#         scope=None):
# class MemGrid(RNNCell):
# class ENCell(RNNCell):
# 
# Path: ops/ops.py
# DATA_FORMAT_NCHW = 'NCHW'
# DATA_FORMAT_NHWC = 'NHWC'
# def signed_sqrt(inputs, scope):
# def l2_norm(inputs, scope):
#     def __init__(self, num_units, input_size=None, activation=tanh):
#     def state_size(self):
#     def output_size(self):
#     def __call__(self, inputs, state, scope=None):
# def _linear(args, output_size, bias, bias_start=0.0, scope=None):
# def adjust_max(start, stop, start_value, stop_value, name=None):
# def fused_batch_norm(
#         inputs,
#         renorm=False,
#         RMAX=None,
#         DMAX=None,
#         decay=0.999,
#         center=True,
#         scale=False,
#         epsilon=0.001,
#         activation_fn=None,
#         param_initializers=None,
#         is_training=True,
#         reuse=None,
#         variables_collections=None,
#         outputs_collections=None,
#         trainable=True,
#         data_format=DATA_FORMAT_NHWC,
#         zero_debias_moving_mean=False,
#         scope=None):
#         def _fused_batch_norm_training():
#         def _fused_batch_norm_inference():
#             def _delay_updates():
# class GRUCell(RNNCell):


import tensorflow as tf
from ops import fops
from ops import ops as myops

        net = slim.repeat(net, 9, block8, scale=0.20)
        net = block8(net, activation_fn=None)

        net = slim.conv2d(net, 1536, 1, scope='Conv2d_7b_1x1')
        end_points['Conv2d_7b_1x1'] = net

        with tf.variable_scope('Logits'):
          end_points['PrePool'] = net
          net = slim.avg_pool2d(net, net.get_shape()[1:3], padding='VALID',
                                scope='AvgPool_1a_8x8')
          net = slim.flatten(net)
          end_points['PreLogitsFlatten'] = net

          net = slim.dropout(net, dropout_keep_prob, is_training=is_training,
                             scope='Dropout')
          net = slim.fully_connected(net, 1024,
                                       scope='echoNet_input_projection')
          end_points['EchonetInput_proj'] = net

    return net, end_points


def rnn_part(inputs, num_classes=1001, is_training=True,
                        dropout_keep_prob=0.8,
                        reuse=None,
                        scope='InceptionResnetV2'):
  end_points = {}

  with tf.variable_scope(scope, 'InceptionResnetV2', [inputs], reuse=reuse):

# Path: ops/fops.py
# def shuttleNet(inputs, n_steps, num_mem, mem_dim,
#             num_round,
#             echocell,
#             lstm_type="encell",
#             activation=tf.tanh,
#             num_frames=None,
#             scope=None,
#             reuse=None):
#     def __init__(self, batch_size, mem_size, mem_dim, name,
#                  activation=tanh, dummy_value=0.0, stddev=0.5):
#     def dlinear(self, input_, output_size, stddev=0.5,
#                         is_range=False, squeeze=False,
#                         name=None, reuse=None):
#                 def identity_initializer(tensor):
#                     def _initializer(shape, dtype=tf.float32):
#     def state_size(self):
#     def output_size(self):
#     def unbalance_linear(self, args, output_size, bias, bias_start=0.0, scope=None):
#     def __call__(self, inputs, state, scope=None):
#     def __init__(self, batch_size, num_mem, num_round, input_offset,
#                  cell=None,
#                  echocell=None,
#                  mem_size=2,
#                  mem_dim=1024,
#                  activation=tanh,
#                  dummy_value=0.0):
#     def state_size(self):
#     def output_size(self):
#     def __call__(self, inputs, state, scope=None):
# def att_weight(decoder_inputs, attention_states,
#                echocell=None,
#                scope=None):
# def lstm(inputs, n_steps, num_units,
#         is_training=True,
#         num_frames=None,
#         lstm_type="GRU",
#         keep_prob=1.0,
#         scope=None):
# class MemGrid(RNNCell):
# class ENCell(RNNCell):
# 
# Path: ops/ops.py
# DATA_FORMAT_NCHW = 'NCHW'
# DATA_FORMAT_NHWC = 'NHWC'
# def signed_sqrt(inputs, scope):
# def l2_norm(inputs, scope):
#     def __init__(self, num_units, input_size=None, activation=tanh):
#     def state_size(self):
#     def output_size(self):
#     def __call__(self, inputs, state, scope=None):
# def _linear(args, output_size, bias, bias_start=0.0, scope=None):
# def adjust_max(start, stop, start_value, stop_value, name=None):
# def fused_batch_norm(
#         inputs,
#         renorm=False,
#         RMAX=None,
#         DMAX=None,
#         decay=0.999,
#         center=True,
#         scale=False,
#         epsilon=0.001,
#         activation_fn=None,
#         param_initializers=None,
#         is_training=True,
#         reuse=None,
#         variables_collections=None,
#         outputs_collections=None,
#         trainable=True,
#         data_format=DATA_FORMAT_NHWC,
#         zero_debias_moving_mean=False,
#         scope=None):
#         def _fused_batch_norm_training():
#         def _fused_batch_norm_inference():
#             def _delay_updates():
# class GRUCell(RNNCell):


# Path: nets/inception_resnet_v2_rnn.py
import tensorflow as tf
from ops import fops
from ops import ops as myops


        net = slim.repeat(net, 9, block8, scale=0.20)
        net = block8(net, activation_fn=None)

        net = slim.conv2d(net, 1536, 1, scope='Conv2d_7b_1x1')
        end_points['Conv2d_7b_1x1'] = net

        with tf.variable_scope('Logits'):
          end_points['PrePool'] = net
          net = slim.avg_pool2d(net, net.get_shape()[1:3], padding='VALID',
                                scope='AvgPool_1a_8x8')
          net = slim.flatten(net)
          end_points['PreLogitsFlatten'] = net

          net = slim.dropout(net, dropout_keep_prob, is_training=is_training,
                             scope='Dropout')
          net = slim.fully_connected(net, 1024,
                                       scope='echoNet_input_projection')
          end_points['EchonetInput_proj'] = net

    return net, end_points


def rnn_part(inputs, num_classes=1001, is_training=True,
                        dropout_keep_prob=0.8,
                        reuse=None,
                        scope='InceptionResnetV2'):
  end_points = {}

  with tf.variable_scope(scope, 'InceptionResnetV2', [inputs], reuse=reuse):

    with slim.arg_scope([myops.fused_batch_norm, slim.dropout],