Move some ndlstm functions to contrib (#16816)
* Added ctc_loss_dense_labels. This does the conversion of dense labels into sparse ones to be passed into the core ctc_loss function. * Removed constant_op from the import. * Matched ctc_loss_dense_labels with the other layers ops. * Added ctc_loss_dense_labels to contrib.layers __init__.py file * Added missing comma to list of ops. * Reordred arguments for ctc_loss_dense_labels Labels should be first then inputs for ctc_loss. * Removed ctc_loss_dense_labels. Replaced it with dense_to_sparse instead so that there'll be only one ctc_loss function. * Replaced ctc_loss_dense_labels with dense_to_sparse * Fixed dense_to_sparse. Some of the names of the variables did not match with that of the parameters. * Updated documentation for dense_to_sparse since it can accept a tensor of any shape. * Added test case for dense_to_sparse. * Updated documentation. Dense to sparse accepts int tensors. * Fixed testDenseFromConstantToSparse. The sparse_to_dense order of arguments in the test are wrong and the expected constant should be of int64. * Modified implementation of ndlstm_base_dynamic. It now uses a BasicLSTMCell that has state_is_tuple=True to address deprecation. Right now it is still unknown why it was set to false in the first place. * Imported lstm1d and lstm2d in ndlstm __init__.py. Makes importing ndlstm modules easier. * Added testGetBlocks in lstm2d_test. * Removed testGetBlocks.py * Modified lstm1d.ndlstm_base_unrolled to use lstm_cell with state_is_tuple = True. * Copied some lstm2d.py functions in ndlstm module to contrib.layers. * Update lstm1d.py Reverted changes made. * Update layers_test.py Fixed failing test. * Modified layers.py and layers_test.py. Made them pass pylint tests.
Loading
Please sign in to comment