Skip to content

Commit

Permalink
promote serket.nn.image to serket.image
Browse files Browse the repository at this point in the history
  • Loading branch information
ASEM000 committed Sep 3, 2023
1 parent 12b3a96 commit 03a3696
Show file tree
Hide file tree
Showing 25 changed files with 1,062 additions and 731 deletions.
File renamed without changes.
17 changes: 17 additions & 0 deletions docs/API/affine.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Affine API
---------------------------------
.. currentmodule:: serket.image

.. autoclass:: HorizontalFlip2D
.. autoclass:: HorizontalShear2D
.. autoclass:: HorizontalTranslate2D
.. autoclass:: RandomHorizontalShear2D
.. autoclass:: RandomHorizontalTranslate2D
.. autoclass:: RandomPerspective2D
.. autoclass:: RandomRotate2D
.. autoclass:: RandomVerticalShear2D
.. autoclass:: RandomVerticalTranslate2D
.. autoclass:: Rotate2D
.. autoclass:: VerticalFlip2D
.. autoclass:: VerticalShear2D
.. autoclass:: VerticalTranslate2D
11 changes: 11 additions & 0 deletions docs/API/augment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Augment API
---------------------------------
.. currentmodule:: serket.image

.. autoclass:: AdjustContrast2D
.. autoclass:: JigSaw2D
.. autoclass:: Pixelate2D
.. autoclass:: PixelShuffle2D
.. autoclass:: Posterize2D
.. autoclass:: RandomContrast2D
.. autoclass:: Solarize2D
File renamed without changes.
8 changes: 8 additions & 0 deletions docs/API/filter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Filter API
---------------------------------
.. currentmodule:: serket.image

.. autoclass:: AvgBlur2D
.. autoclass:: FFTFilter2D
.. autoclass:: Filter2D
.. autoclass:: GaussianBlur2D
41 changes: 13 additions & 28 deletions docs/API/image.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
Image filtering
---------------------------------
.. currentmodule:: serket.nn

.. autoclass:: AdjustContrast2D
.. autoclass:: AvgBlur2D
.. autoclass:: FFTFilter2D
.. autoclass:: Filter2D
.. autoclass:: GaussianBlur2D
.. autoclass:: HorizontalFlip2D
.. autoclass:: HorizontalShear2D
.. autoclass:: HorizontalTranslate2D
.. autoclass:: JigSaw2D
.. autoclass:: Pixelate2D
.. autoclass:: PixelShuffle2D
.. autoclass:: Posterize2D
.. autoclass:: RandomContrast2D
.. autoclass:: RandomHorizontalShear2D
.. autoclass:: RandomHorizontalTranslate2D
.. autoclass:: RandomPerspective2D
.. autoclass:: RandomRotate2D
.. autoclass:: RandomVerticalShear2D
.. autoclass:: RandomVerticalTranslate2D
.. autoclass:: Rotate2D
.. autoclass:: Solarize2D
.. autoclass:: VerticalFlip2D
.. autoclass:: VerticalShear2D
.. autoclass:: VerticalTranslate2D
🖼️ Image API
======================

.. currentmodule:: serket


.. toctree::
:maxdepth: 2
:caption: API Documentation

affine
augment
filter
File renamed without changes.
9 changes: 3 additions & 6 deletions docs/API/api.rst → docs/API/nn.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
``Serket`` NN API
🧠 Neural network API
======================

.. currentmodule:: serket

.. autofunction:: tree_state
.. autofunction:: tree_eval
.. autofunction:: def_init_entry
.. autofunction:: def_act_entry

.. toctree::
:maxdepth: 2
Expand All @@ -18,11 +14,12 @@
containers
convolution
dropout
image
linear
normalization
pooling
recurrent
reshaping




File renamed without changes.
14 changes: 7 additions & 7 deletions docs/API/pytreeclass.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
``PyTreeClass`` API
🌲 Tree & Module API
=============================

The entiriety of pytreeclass is re-exported here for convenience under the serket namespace

.. note::
`pytreeclass <https://pytreeclass.readthedocs.io/en/latest/>`_ API is re-exported under the ``serket`` namespace.
.. toctree::
:maxdepth: 2
:caption: API Documentation

pytreeclass/core
pytreeclass/masking
pytreeclass/advanced_api
pytreeclass/pretty_print
core
masking
advanced_api
pretty_print
67 changes: 67 additions & 0 deletions docs/_static/tree_graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions docs/_static/tree_graph_stylized.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/tree_mermaid.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
``Serket`` Examples
``serket`` Examples
======================

.. toctree::
Expand Down
12 changes: 10 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,20 @@ Install from github::
examples


.. currentmodule:: serket

.. autofunction:: tree_state
.. autofunction:: tree_eval
.. autofunction:: def_init_entry
.. autofunction:: def_act_entry


.. toctree::
:caption: API Documentation
:maxdepth: 1


API/api
API/nn
API/image
API/pytreeclass

Apache2.0 License.
Expand Down
67 changes: 67 additions & 0 deletions serket/image/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Copyright 2023 Serket authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from .affine import (
HorizontalFlip2D,
HorizontalShear2D,
HorizontalTranslate2D,
Pixelate2D,
RandomHorizontalShear2D,
RandomHorizontalTranslate2D,
RandomPerspective2D,
RandomRotate2D,
RandomVerticalShear2D,
RandomVerticalTranslate2D,
Rotate2D,
Solarize2D,
VerticalFlip2D,
VerticalShear2D,
VerticalTranslate2D,
)
from .augment import (
AdjustContrast2D,
JigSaw2D,
PixelShuffle2D,
Posterize2D,
RandomContrast2D,
)
from .filter import AvgBlur2D, FFTFilter2D, Filter2D, GaussianBlur2D

__all__ = (
# image
"AdjustContrast2D",
"AvgBlur2D",
"FFTFilter2D",
"Filter2D",
"GaussianBlur2D",
"HorizontalFlip2D",
"HorizontalShear2D",
"HorizontalTranslate2D",
"JigSaw2D",
"Pixelate2D",
"PixelShuffle2D",
"Posterize2D",
"RandomContrast2D",
"RandomHorizontalShear2D",
"RandomHorizontalTranslate2D",
"RandomPerspective2D",
"RandomRotate2D",
"RandomVerticalShear2D",
"RandomVerticalTranslate2D",
"Rotate2D",
"Solarize2D",
"VerticalFlip2D",
"VerticalShear2D",
"VerticalTranslate2D",
)
Loading

0 comments on commit 03a3696

Please sign in to comment.