Add type annotations for Rembert/Splinter and copies (#16338)

* undo black autoformat

* minor fix to rembert forward with default

* make fix-copies, make quality

* Adding types to template model

* Removing List from the template types

* Remove `Optional` from a couple of types that don't accept `None`

Co-authored-by: matt <rocketknight1@gmail.com>
This commit is contained in:
Jacob Dineen
2022-03-22 13:07:48 -07:00
committed by GitHub
parent c30798ec9d
commit ec3aace0ae
26 changed files with 541 additions and 527 deletions

View File

@@ -25,6 +25,7 @@ import torch.utils.checkpoint
from packaging import version
from torch import nn
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
from typing import Optional, Tuple, Union
from ...activations import ACT2FN
from ...file_utils import (