Commit 1761a71f authored by Yuxin Wu's avatar Yuxin Wu

py3 doesn't have sys.maxint

parent fc079e63
......@@ -134,6 +134,9 @@ class AccumGradOptimizer(ProxyOptimizer):
and apply them together in every :math:`k`th :meth:`minimize` call.
This is equivalent to using a :math:`k` times larger batch size plus a
:math:`k` times larger learning rate, but uses much less memory.
Note that this implementation may not support all models.
E.g., it doesn't support sparse gradient update.
"""
def __init__(self, opt, niter):
......
......@@ -7,7 +7,6 @@ import weakref
import time
from six.moves import range
import six
import sys
from ..callbacks import (
Callback, Callbacks, Monitors, TrainingMonitor,
......@@ -235,7 +234,7 @@ class Trainer(object):
def train(self,
callbacks, monitors,
session_creator, session_init,
steps_per_epoch, starting_epoch=1, max_epoch=sys.maxint - 1):
steps_per_epoch, starting_epoch=1, max_epoch=9999999):
"""
Implemented by:
......@@ -254,7 +253,7 @@ class Trainer(object):
def train_with_defaults(
self, callbacks=None, monitors=None,
session_creator=None, session_init=None,
steps_per_epoch=None, starting_epoch=1, max_epoch=sys.maxint - 1):
steps_per_epoch=None, starting_epoch=1, max_epoch=9999999):
"""
Same as :meth:`train()`, but will:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment