Skip to content

Commit

Permalink
minor doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Nov 21, 2024
1 parent e75745c commit f4e8545
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/source/using_doctr/using_model_export.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Compiling your models (PyTorch only)

**NOTE:**

- This feature is only available for PyTorch models.
- This feature is only available if you use PyTorch as backend.
- The recognition architecture `master` is not supported for model compilation yet.
- We provide only official support for the default (`inductor`) backend, but you can try other backends, configurations depending on your hardware and requirements as well.

Expand Down Expand Up @@ -125,7 +125,7 @@ It defines a common format for representing models, including the network struct
dummy_input = torch.rand((batch_size, input_shape), dtype=torch.float32)
model_path = export_model_to_onnx(
model,
model_name="vitstr.onnx,
model_name="vitstr.onnx",
dummy_input=dummy_input
)
Expand Down
1 change: 1 addition & 0 deletions doctr/models/classification/zoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def _orientation_predictor(
else:
allowed_archs = [classification.MobileNetV3]
if is_torch_available():
# Adding the type for torch compiled models to the allowed architectures
from doctr.models.utils import _CompiledModule

allowed_archs.append(_CompiledModule)
Expand Down
2 changes: 1 addition & 1 deletion doctr/models/detection/zoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _predictor(arch: Any, pretrained: bool, assume_straight_pages: bool = True,
else:
allowed_archs = [detection.DBNet, detection.LinkNet, detection.FAST]
if is_torch_available():
# The following is required for torch compiled models
# Adding the type for torch compiled models to the allowed architectures
from doctr.models.utils import _CompiledModule

allowed_archs.append(_CompiledModule)
Expand Down
2 changes: 1 addition & 1 deletion doctr/models/recognition/zoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _predictor(arch: Any, pretrained: bool, **kwargs: Any) -> RecognitionPredict
else:
allowed_archs = [recognition.CRNN, recognition.SAR, recognition.MASTER, recognition.ViTSTR, recognition.PARSeq]
if is_torch_available():
# The following is required for torch compiled models
# Adding the type for torch compiled models to the allowed architectures
from doctr.models.utils import _CompiledModule

allowed_archs.append(_CompiledModule)
Expand Down

0 comments on commit f4e8545

Please sign in to comment.