Skip to content

Commit

Permalink
fix documentation and alphabetically sort modules
Browse files Browse the repository at this point in the history
  • Loading branch information
galeone committed Aug 22, 2019
1 parent 64b912f commit 1c3fed0
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 7 deletions.
1 change: 1 addition & 0 deletions ashpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from . import models
from . import trainers
from . import ashtypes
from . import keras
from .modes import LogEvalMode

__version__ = "1.0.2"
Expand Down
29 changes: 29 additions & 0 deletions ashpy/keras/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2019 Zuru Tech HK Limited. All Rights Reserved.
#
# 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
#
# http://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.

"""
Custom extensions of standard Keras components.
.. currentmodule:: ashpy.keras
.. rubric:: Modules
.. autosummary::
:nosignatures:
:toctree: keras
:template: autosummary/submodule.rst
losses
"""
6 changes: 4 additions & 2 deletions ashpy/keras/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def call(self, x: tf.Tensor, y: tf.Tensor) -> tf.Tensor:


class DMinMax(tf.keras.losses.Loss):
r"""Implementation of MinMax Discriminator loss as :py:class:`tf.keras.losses.Loss`.
r"""
Implementation of MinMax Discriminator loss as :py:class:`tf.keras.losses.Loss`.
.. math::
L_{D} = - \frac{1}{2} E [\log(D(x)) + \log (1 - D(G(z))]
Expand Down Expand Up @@ -116,7 +117,8 @@ class DLeastSquare(tf.keras.losses.Loss):
"""Discriminator Least Square Loss as :py:class:`tf.keras.losses.Loss`."""

def __init__(self) -> None:
"""Least square Loss for Discriminator.
r"""
Least square Loss for Discriminator.
Reference: Least Squares Generative Adversarial Networks [1]_ .
Expand Down
2 changes: 1 addition & 1 deletion ashpy/models/convolutional/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
unet.UNet
unet.SUNet
unet.FunctionalUNet
unet.FUNet
----
Expand Down
2 changes: 1 addition & 1 deletion ashpy/models/convolutional/unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from ashpy.layers import Attention, InstanceNormalization
from ashpy.models.convolutional.interfaces import Conv2DInterface

__ALL__ = ["UNet", "SUNet", "FunctionalUNet"]
__ALL__ = ["UNet", "SUNet", "FUNet"]


class UNet(Conv2DInterface):
Expand Down
8 changes: 5 additions & 3 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ API Reference
:nosignatures:
:toctree: _autosummary

ashpy.models
ashpy.ashtypes
ashpy.contexts
ashpy.trainers
ashpy.keras
ashpy.layers
ashpy.losses
ashpy.metrics
ashpy.models
ashpy.modes
ashpy.ashtypes
ashpy.trainers

0 comments on commit 1c3fed0

Please sign in to comment.