src/layers.py
def convolutional_network(
    x_in: int, in_h_w: int, in_depth: int, filter_h_w: int, out_depth: int
):
    """
    Create a convolutional network layer with the input parameters provided.
    """
    out_h_w = (in_h_w - filter_h_w) + 1  # no padding, stride = 1
    W = tf.Variable(
        tf.truncated_normal(
            shape=(filter_h_w, filter_h_w, in_depth, out_depth), mean=mu, stddev=sigma
        )
    )
    B = tf.Variable(tf.zeros(shape=(1, out_h_w, out_h_w, out_depth)))
    strides = [1, 1, 1, 1]
    padding = "VALID"
    y_out = tf.nn.conv2d(x_in, W, strides=strides, padding=padding) + B
    return y_out

    Create a convolutional network layer with the input parameters provided.
    
Create a convolutional network layer with the input parameters provided.
Create a convolutional network layer with the input parameters provided .
def convolutional_network(
    x_in: int, in_h_w: int, in_depth: int, filter_h_w: int, out_depth: int
):
    out_h_w = (in_h_w - filter_h_w) + 1  
    W = tf.Variable(
        tf.truncated_normal(
            shape=(filter_h_w, filter_h_w, in_depth, out_depth), mean=mu, stddev=sigma
        )
    )
    B = tf.Variable(tf.zeros(shape=(1, out_h_w, out_h_w, out_depth)))
    strides = [1, 1, 1, 1]
    padding = "VALID"
    y_out = tf.nn.conv2d(x_in, W, strides=strides, padding=padding) + B
    return y_out
def convolutional_network ( x_in : int , in_h_w : int , in_depth : int , filter_h_w : int , out_depth : int ) : out_h_w = ( in_h_w - filter_h_w ) + 1 W = tf . Variable ( tf . truncated_normal ( shape = ( filter_h_w , filter_h_w , in_depth , out_depth ) , mean = mu , stddev = sigma ) ) B = tf . Variable ( tf . zeros ( shape = ( 1 , out_h_w , out_h_w , out_depth ) ) ) strides = [ 1 , 1 , 1 , 1 ] padding = "VALID" y_out = tf . nn . conv2d ( x_in , W , strides = strides , padding = padding ) + B return y_out
Create a convolutional network layer with the input parameters provided.
Create a convolutional network layer with the input parameters provided .
"""
    Create a convolutional network layer with the input parameters provided.
    """ # no padding, stride = 1
x_in
int
in_h_w
int
in_depth
int
filter_h_w
int
out_depth
int