Visual Attention Network (VAN) (#16027)

* encoder works

* addded files

* norm in stage

* convertion script

* tests

* fix copies

* make fix-copies

* fixed __init__

* make fix-copies

* fix

* shapiro test needed

* make fix-copie

* minor changes

* make style + quality

* minor refactor conversion script

* rebase + tests

* removed unused variables

* updated doc

* toctree

* CI

* doc

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* resolved conversations

* make fixup

* config passed to modules

* config passed to modules

* Apply suggestions from code review

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* conversations

* conversations

* copyrights

* normal test

* tests

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
This commit is contained in:
Francesco Saverio Zuppichini
2022-03-15 08:47:12 +01:00
committed by GitHub
parent 8f3ea7a1e1
commit 0a057201a9
21 changed files with 1393 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ from .file_utils import (
is_pytorch_quantization_available,
is_rjieba_available,
is_scatter_available,
is_scipy_available,
is_sentencepiece_available,
is_soundfile_availble,
is_spacy_available,
@@ -351,6 +352,16 @@ def require_sentencepiece(test_case):
return test_case
def require_scipy(test_case):
"""
Decorator marking a test that requires Scipy. These tests are skipped when SentencePiece isn't installed.
"""
if not is_scipy_available():
return unittest.skip("test requires Scipy")(test_case)
else:
return test_case
def require_tokenizers(test_case):
"""
Decorator marking a test that requires 🤗 Tokenizers. These tests are skipped when 🤗 Tokenizers isn't installed.