Skip to content

Commit

Permalink
Remove Python 2 compatibility code from optimizers package.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 297050950
  • Loading branch information
j2i2 authored and copybara-github committed Feb 25, 2020
1 parent 4914792 commit 47387a6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 29 deletions.
5 changes: 1 addition & 4 deletions trax/optimizers/adafactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Lint as: python3
"""Adafactor optimizer class."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from trax.math import numpy as np
from trax.optimizers import base as opt_base

Expand Down
5 changes: 1 addition & 4 deletions trax/optimizers/adam.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Lint as: python3
"""Adam optimizer class."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from trax.math import numpy as np
from trax.optimizers import base as opt_base

Expand Down
5 changes: 1 addition & 4 deletions trax/optimizers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Lint as: python3
"""Trax base optimizer class."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from trax.layers import base as layers
from trax.math import numpy as np

Expand Down
6 changes: 1 addition & 5 deletions trax/optimizers/momentum.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Lint as: python3
"""Nesterov momentum optimizer (also known as Nesterov Accelerated Gradient)."""


from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from trax.math import numpy as np
from trax.optimizers import base

Expand Down
5 changes: 1 addition & 4 deletions trax/optimizers/rms_prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Lint as: python3
"""RMSProp optimizer class."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from trax.math import numpy as np
from trax.optimizers import base as opt_base

Expand Down
5 changes: 1 addition & 4 deletions trax/optimizers/sgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Lint as: python3
"""SGD optimizer class."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from trax.optimizers import base as opt_base


Expand Down
5 changes: 1 addition & 4 deletions trax/optimizers/sm3.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Lint as: python3
"""SM3 optimizer class."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from trax.math import numpy as np
from trax.optimizers import base as opt_base

Expand Down

0 comments on commit 47387a6

Please sign in to comment.