Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Commit

Permalink
fix solver init problem when data iter is not given
Browse files Browse the repository at this point in the history
  • Loading branch information
jermainewang committed May 13, 2017
1 parent 0e571ac commit 77896e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions minpy/nn/__init__.py
@@ -1,2 +0,0 @@
import os
os.environ['MXNET_ENGINE_TYPE'] = 'NaiveEngine'
6 changes: 4 additions & 2 deletions minpy/nn/solver.py
Expand Up @@ -156,8 +156,10 @@ def _reset(self):
self.init_configs[p] = init_config

def _reset_data_iterators(self):
self.train_dataiter.reset()
self.test_dataiter.reset()
if self.train_dataiter:
self.train_dataiter.reset()
if self.test_dataiter:
self.test_dataiter.reset()

def _step(self, batch):
"""
Expand Down

0 comments on commit 77896e5

Please sign in to comment.