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

Miscellaneous (typo) fixes #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nlpgnn/layers/gpt2_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class MLP(tf.keras.layers.Layer):
def __init__(self, num_attention_heads, initializer_range,
resid_pdrop_rate, name='mlp', **kwargs):
super(MLP, self).__init__(name, **kwargs)
super(MLP, self).__init__(name=name, **kwargs)
self.resid_pdrop_rate = resid_pdrop_rate
self.num_attention_heads = num_attention_heads
self.initializer_range = initializer_range
Expand Down
4 changes: 2 additions & 2 deletions tests/KG2E/run_tucker.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
print("Epoch:{}\tLoss:{:.4f}\tHit@5:{:.4f}\tHit@10:{:.4f}\tMRR{:.4f}\n".format(epoch, np.mean(losses),
hit5, hit10, MRR))
# For filter Warning in calculate gradient of moving_mean and moving_variance
grads = tape.gradient(loss, model.trainable_variable)
grads = tape.gradient(loss, model.trainable_variables)
optimizer.apply_gradients(
grads_and_vars=zip(grads, model.trainable_variable))
grads_and_vars=zip(grads, model.trainable_variables))
Batch += 1