Skip to content

Exception in forward method #1

@tzc0029

Description

@tzc0029

Hello,

Thank you for sharing your code. I encountered an exception when initializing Gan:
`
Exception has occurred: ValueError
Shape must be rank 2 but is rank 3 for 'MatMul_4' (op: 'MatMul') with input shapes: [?,?,200], [200,100].

During handling of the above exception, another exception occurred:

File "/home/cjig/REA/models.py", line 260, in forward
layer_1 = tf.nn.relu(tf.add(tf.matmul(in_sample, self.weights['h1']), self.biases['b1']))
File "/home/cjig/REA/models.py", line 284, in build
scores = self.forward(self.sample_pos - self.sample_neg)
File "/home/cjig/REA/models.py", line 252, in init
self.build()
File "/home/cjig/REA/train.py", line 59, in
generator = Gan(n_input=FLAGS.se_dim, n_hidden_1=100, n_hidden_2=30, model=model_se, batch_size= batch_size, mode="gen")
`
I'm certain that I've created the exact same environment as you mentioned in README, so that doesn't seem to be the problem here. Can you please take a look at what could go wrong?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions