Skip to content
New issue

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

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

Already on GitHub? # to your account

no fully-connected layer #6

Open
nachifur opened this issue Mar 14, 2021 · 0 comments
Open

no fully-connected layer #6

nachifur opened this issue Mar 14, 2021 · 0 comments

Comments

@nachifur
Copy link

Nice work! Thank you for sharing your code.
I am confused about the fully connected layer
image
I can't find the fully connected layer function applied in the network code.
This function (https://github.com/zhengziqiang/ForkGAN/blob/master/ops.py) does not seem to be used elsewhere.

def linear(input_, output_size, scope=None, stddev=0.02, bias_start=0.0, with_w=False):
    with tf.variable_scope(scope or "Linear"):
        matrix = tf.get_variable("Matrix", [input_.get_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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant