holm-aune-bachelor2018 / ctc Goto Github PK
View Code? Open in Web Editor NEWSpeech recognition with CTC in Keras with Tensorflow backend
License: GNU General Public License v3.0
Speech recognition with CTC in Keras with Tensorflow backend
License: GNU General Public License v3.0
Line 20 in 29f39a2
I trained and saved a model successfully, but when I load back the model, it gave this error:
I am working on Windows 10 with tensorflow r1.10.[<tf.Tensor 'classifier/Reshape_1:0' shape=(?, ?, 47) dtype=float32>, <tf.Tensor 'labels:0' shape=(?, ?) dtype=float32>, <tf.Tensor 'input_length:0' shape=(?, 1) dtype=float32>, <tf.Tensor 'label_length:0' shape=(?, 1) dtype=float32>] XXX lineno: 358, opcode: 47 Traceback (most recent call last): File "D:\11785\HW3\hw3p2-data-V2\runner.py", line 332, in <module> train() File "D:\11785\HW3\hw3p2-data-V2\runner.py", line 299, in train net = tf.keras.models.load_model("models/model_every_ckpt_best", custom_objects=custom_objects) File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\keras\engine\saving.py", line 229, in load_model model = model_from_config(model_config, custom_objects=custom_objects) File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\keras\engine\saving.py", line 306, in model_from_config return deserialize(config, custom_objects=custom_objects) File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\keras\layers\serialization.py", line 64, in deserialize printable_module_name='layer') File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py", line 173, in deserialize_keras_object list(custom_objects.items()))) File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\keras\engine\network.py", line 1219, in from_config process_node(layer, node_data) File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\keras\engine\network.py", line 1179, in process_node layer(input_tensors, **kwargs) File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 736, in __call__ outputs = self.call(inputs, *args, **kwargs) File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\keras\layers\core.py", line 715, in call return self.function(inputs, **arguments) File "D:/11785/HW3/hw3p2-data-V2/modules.py", line 358, in ctc_lambda_func y_pred, labels, input_length, label_length = args SystemError: unknown opcode [Finished in 26.4s with exit code 1]
Seems the Lambda layer is causing this problem, do you know why?
hi,
I just can run the program with epoch_len=2 and as I increase it to even just 5, it stops with the following error. Therefore, I can not train the model on the entire database in each epoch.
Error:
tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at ctc_loss_op.cc:206 : Invalid argument: Saw a non-null label (index >= num_classes - 1) following a null label, batch: 0 num_classes: 29 labels: 26,9,16,0,28,5,0,3,15,4,0 labels seen so far: 26,9,16,0
Thanks in advance
Line 37 in 29f39a2
should cumulate editdistance and length, then compute wer at end.
i use predict.py to predict a file but plantext is not Unicode text. it like:
INFO:tensorflow:Inference results: [{'decoded': array([8, 8, 8]), 'plaintext': b'hhh'}]
how i can to predict in UTF-8, Unicode text
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.