i am importing a module from sitepackages but showing error. i am successfully able to import a file eg.
from tensorflow.contrib.rnn.python.ops import rnn_cell
but when i am going to import a module from rnn_cell by
from tensorflow.contrib.rnn.python.ops.rnn_cell import _norm
i am getting error
ImportError: cannot import name _norm
PS the module _norm() is present there in rnn_cell file.
I'm not sure this method call has meaning, but anyway, first instantiate the LayerNormBasicLSTMCell
class, then call its (internal) method _norm
.
from tensorflow.contrib.rnn.python.ops.rnn_cell import LayerNormBasicLSTMCell
_norm = LayerNormBasicLSTMCell(10)._norm
print(_norm)
Again, this method is for internal use, and is not for outside use. So, I don't think this _norm shortcut has meaning.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.