Skip to content

Commit 9083d69

Browse files
committed
Fix some imports
1 parent ed80f4b commit 9083d69

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

tests/test_parser/test_tf_to_spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22
import tensorflow as tf
33

4-
from vgslify.parsers.tensorflow import tf_to_spec
4+
from vgslify.model_parsers.tensorflow import tf_to_spec
55

66

77
def test_input_layer():

vgslify/model_parsers/tensorflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
ReshapeConfig,
1919
RNNConfig,
2020
)
21-
from vgslify.parsers.base import BaseModelParser
21+
from vgslify.model_parsers.base import BaseModelParser
2222

2323

2424
class TensorFlowModelParser(BaseModelParser):
@@ -426,7 +426,7 @@ def register_custom_parser(layer_cls: Type[tf.keras.layers.Layer]) -> Callable:
426426
--------
427427
Registering a custom parser for a `MyCustomLayer`:
428428
429-
>>> from vgslify.parsers.tensorflow import register_custom_parser
429+
>>> from vgslify.model_parsers.tensorflow import register_custom_parser
430430
>>> import tensorflow as tf
431431
>>> class MyCustomLayer(tf.keras.layers.Layer):
432432
... def __init__(self, units: int):

vgslify/model_parsers/torch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
ReshapeConfig,
2020
RNNConfig,
2121
)
22-
from vgslify.parsers.base import BaseModelParser
22+
from vgslify.model_parsers.base import BaseModelParser
2323
from vgslify.torch.layers import Reshape
2424

2525

@@ -431,7 +431,7 @@ def register_custom_parser(layer_cls: Type[nn.Module]):
431431
--------
432432
Registering a custom parser for a `MyCustomLayer`:
433433
434-
>>> from vgslify.parsers.torch import register_custom_parser
434+
>>> from vgslify.model_parsers.torch import register_custom_parser
435435
>>> from torch import nn
436436
>>> class MyCustomLayer(nn.Module):
437437
... def __init__(self, param: int):

vgslify/utils/model_to_spec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def model_to_spec(model) -> str:
3030
3131
Examples
3232
--------
33-
>>> from vgslify.utils import model_to_spec
33+
>>> from vgslify import model_to_spec
3434
>>> import tensorflow as tf
3535
>>> model = tf.keras.models.load_model("path_to_model.h5")
3636
>>> spec_string = model_to_spec(model)
@@ -39,13 +39,13 @@ def model_to_spec(model) -> str:
3939

4040
# Check if it's a TensorFlow model
4141
if tf and isinstance(model, tf.keras.Model):
42-
from vgslify.parsers.tensorflow import TensorFlowModelParser
42+
from vgslify.model_parsers import TensorFlowModelParser
4343

4444
parser = TensorFlowModelParser()
4545

4646
# Check if it's a PyTorch model
4747
if nn and isinstance(model, nn.Module):
48-
from vgslify.parsers.torch import TorchModelParser
48+
from vgslify.model_parsers import TorchModelParser
4949

5050
parser = TorchModelParser()
5151

0 commit comments

Comments
 (0)