Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not an issue #32

Open
Auth0rM0rgan opened this issue Sep 22, 2018 · 2 comments
Open

Not an issue #32

Auth0rM0rgan opened this issue Sep 22, 2018 · 2 comments

Comments

@Auth0rM0rgan
Copy link

Hey @hwalsuklee,

Thanks for sharing your code which helps me a lot. I have a question about the linear function in ops.py

I would be appreciated if you can explain what you are doing in the this function.

def linear(input_, output_size, scope=None, stddev=0.02, bias_start=0.0, with_w=False):
    shape = input_.get_shape().as_list()

    with tf.variable_scope(scope or "Linear"):
        matrix = tf.get_variable("Matrix", [shape[1], output_size], tf.float32,
                 tf.random_normal_initializer(stddev=stddev))
        bias = tf.get_variable("bias", [output_size],
        initializer=tf.constant_initializer(bias_start))
        if with_w:
            return tf.matmul(input_, matrix) + bias, matrix, bias
        else:
            return tf.matmul(input_, matrix) + bias

Also, It would be great if you add some comments when you are implementing; to be much easier for others to understand.

Thanks.

@hwalsuklee
Copy link
Owner

Hi.

As it is mentioned on the top in ops.py, this is borrowed from https://github.com/carpedm20/DCGAN-tensorflow

It is just an implementation of fully connected layer.

Input×weight+bias

Hwalsuk Lee

@Auth0rM0rgan
Copy link
Author

Thanks, you can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants