# Path: deep_architect/contrib/misc/search_spaces/tensorflow/common.py
# D = hp.Discrete
# 
# def siso_tensorflow_module(name, compile_fn, name_to_hyperp, scope=None):
#     return htf.TensorflowModule(name, compile_fn, name_to_hyperp, ['in'],
#                                 ['out'], scope).get_io()


from deep_architect.contrib.misc.search_spaces.tensorflow.common import D, siso_tensorflow_module
import deep_architect.contrib.misc.search_spaces.tensorflow.dnn as dnn
import deep_architect.modules as mo
import tensorflow as tf
import numpy as np
                                   padding='SAME')

        def forward_fn(di):
            return {'out': conv_op(di['in'])}

        return forward_fn

    return siso_tensorflow_module(
        'Conv2D', compile_fn, {
            'num_filters': h_num_filters,
            'filter_width': h_filter_width,
            'stride': h_stride,
            'use_bias': h_use_bias,
        })


def max_pool2d(h_kernel_size, h_stride):

    def compile_fn(di, dh):

        def forward_fn(di):
            return {
                'out':
                tf.nn.max_pool(di['in'],
                               [1, dh['kernel_size'], dh['kernel_size'], 1],
                               [1, dh['stride'], dh['stride'], 1], 'SAME')
            }

        return forward_fn


# Path: deep_architect/contrib/misc/search_spaces/tensorflow/common.py
# D = hp.Discrete
# 
# def siso_tensorflow_module(name, compile_fn, name_to_hyperp, scope=None):
#     return htf.TensorflowModule(name, compile_fn, name_to_hyperp, ['in'],
#                                 ['out'], scope).get_io()


# Path: deep_architect/contrib/misc/search_spaces/tensorflow/cnn2d.py
from deep_architect.contrib.misc.search_spaces.tensorflow.common import D, siso_tensorflow_module
import deep_architect.contrib.misc.search_spaces.tensorflow.dnn as dnn
import deep_architect.modules as mo
import tensorflow as tf
import numpy as np

                                   padding='SAME')

        def forward_fn(di):
            return {'out': conv_op(di['in'])}

        return forward_fn

    return siso_tensorflow_module(
        'Conv2D', compile_fn, {
            'num_filters': h_num_filters,
            'filter_width': h_filter_width,
            'stride': h_stride,
            'use_bias': h_use_bias,
        })


def max_pool2d(h_kernel_size, h_stride):

    def compile_fn(di, dh):

        def forward_fn(di):
            return {
                'out':
                tf.nn.max_pool(di['in'],
                               [1, dh['kernel_size'], dh['kernel_size'], 1],
                               [1, dh['stride'], dh['stride'], 1], 'SAME')
            }

        return forward_fn


    return siso_tensorflow_module('MaxPool2D', compile_fn, {