You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/08/08 15:24:30 UTC
[GitHub] sandeep-krishnamurthy closed pull request #12037: Fix for undefined
variable errors
sandeep-krishnamurthy closed pull request #12037: Fix for undefined variable errors
URL: https://github.com/apache/incubator-mxnet/pull/12037
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/example/rnn/word_lm/train.py b/example/rnn/word_lm/train.py
index aa641358cf9..c48fe800ce9 100644
--- a/example/rnn/word_lm/train.py
+++ b/example/rnn/word_lm/train.py
@@ -20,7 +20,7 @@
import argparse, math
import logging
from data import Corpus, CorpusIter
-from model import *
+from model import rnn, softmax_ce_loss
from module import *
from mxnet.model import BatchEndParam
diff --git a/example/sparse/factorization_machine/train.py b/example/sparse/factorization_machine/train.py
index c73ce88d41c..b30f9cc81ac 100644
--- a/example/sparse/factorization_machine/train.py
+++ b/example/sparse/factorization_machine/train.py
@@ -18,7 +18,7 @@
import mxnet as mx
from metric import *
from mxnet.test_utils import *
-from model import *
+from model import factorization_machine_model
import argparse, os
parser = argparse.ArgumentParser(description="Run factorization machine with criteo dataset",
diff --git a/example/sparse/wide_deep/train.py b/example/sparse/wide_deep/train.py
index 89befb5aa82..6fd81b7fa48 100644
--- a/example/sparse/wide_deep/train.py
+++ b/example/sparse/wide_deep/train.py
@@ -17,8 +17,8 @@
import mxnet as mx
from mxnet.test_utils import *
-from data import *
-from model import *
+from data import get_uci_adult
+from model import wide_deep_model
import argparse
import os
diff --git a/python/mxnet/initializer.py b/python/mxnet/initializer.py
index ef9026d4507..8ae729f3ccf 100755
--- a/python/mxnet/initializer.py
+++ b/python/mxnet/initializer.py
@@ -697,7 +697,7 @@ class FusedRNN(Initializer):
def __init__(self, init, num_hidden, num_layers, mode, bidirectional=False, forget_bias=1.0):
if isinstance(init, string_types):
klass, kwargs = json.loads(init)
- init = _INITIALIZER_REGISTRY[klass.lower()](**kwargs)
+ init = registry._REGISTRY[klass.lower()](**kwargs)
super(FusedRNN, self).__init__(init=init.dumps() if init is not None else None,
num_hidden=num_hidden, num_layers=num_layers, mode=mode,
bidirectional=bidirectional, forget_bias=forget_bias)
diff --git a/tests/python/mkl/test_mkldnn.py b/tests/python/mkl/test_mkldnn.py
index ff9ba538b95..03f3c76bb65 100644
--- a/tests/python/mkl/test_mkldnn.py
+++ b/tests/python/mkl/test_mkldnn.py
@@ -26,6 +26,7 @@
from mxnet import gluon
from mxnet.gluon import nn
from mxnet.test_utils import *
+import test_mkldnn_install as install
curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
sys.path.append(os.path.join(curr_path, '../unittest/'))
from common import with_seed
@@ -261,4 +262,4 @@ def check_fullyconnected_training(stype):
if __name__ == '__main__':
- test_mkldnn_install()
+ install.test_mkldnn_install()
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services