"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "653076ca307520ee85fd5f5de6918019f8521bb5"
Unverified Commit baa00f65 authored by Chino's avatar Chino Committed by GitHub
Browse files

Fix exception thrown using MishActivation (#19739)

* Fix exception thrown using MishActivation

* Update activations.py
parent 2dd1b8f0
...@@ -121,7 +121,7 @@ class MishActivation(nn.Module): ...@@ -121,7 +121,7 @@ class MishActivation(nn.Module):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
if version.parse(version.parse(torch.__version__).base_version) < version.parse("1.9"): if version.parse(torch.__version__) < version.parse("1.9.0"):
self.act = self._mish_python self.act = self._mish_python
else: else:
self.act = nn.functional.mish self.act = nn.functional.mish
......
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