Unverified Commit acaa2e62 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Clean-up code (#4790)

parent fa661ce7
......@@ -164,9 +164,9 @@ class XLNetConfig(PretrainedConfig):
self.n_head = n_head
assert d_model % n_head == 0
if "d_head" in kwargs:
assert kwargs["d_head"] == d_model // n_head, (
f"`d_head` ({kwargs['d_head']}) should be equal to `d_model // n_head` ({d_model // n_head})"
)
assert (
kwargs["d_head"] == d_model // n_head
), f"`d_head` ({kwargs['d_head']}) should be equal to `d_model // n_head` ({d_model // n_head})"
self.d_head = d_model // n_head
self.ff_activation = ff_activation
self.d_inner = d_inner
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment