mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
fix grad_clip naming (#4967)
This commit is contained in:
parent
781e95cf53
commit
9b84f987bd
|
@ -796,8 +796,6 @@ def create_default_optimizer():
|
||||||
beta2 = env_opt("optimizer_B2", 0.999)
|
beta2 = env_opt("optimizer_B2", 0.999)
|
||||||
eps = env_opt("optimizer_eps", 1e-8)
|
eps = env_opt("optimizer_eps", 1e-8)
|
||||||
L2 = env_opt("L2_penalty", 1e-6)
|
L2 = env_opt("L2_penalty", 1e-6)
|
||||||
max_grad_norm = env_opt("grad_norm_clip", 1.0)
|
grad_clip = env_opt("grad_norm_clip", 1.0)
|
||||||
optimizer = Adam(learn_rate, L2=L2, beta1=beta1, beta2=beta2, eps=eps, ops=ops)
|
optimizer = Adam(learn_rate, L2=L2, beta1=beta1, beta2=beta2, eps=eps, ops=ops, grad_clip=grad_clip)
|
||||||
optimizer.max_grad_norm = max_grad_norm
|
|
||||||
optimizer.device = ops.device_type
|
|
||||||
return optimizer
|
return optimizer
|
||||||
|
|
Loading…
Reference in New Issue
Block a user