-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools/StreamingTDSModelConverter.cpp? #893
Comments
Hi @abhinavkulkarni The build of StreamingTDSModelConverter fail with this error: /home/empresa/wav2letter_v0.2/tools/StreamingTDSModelConverter.cpp:24:10: fatal error: inference/module/feature/feature.h: File or directory does not exist (No existe el archivo o el directorio) The path is really bad because the inference folder is duplicated: /home/empresa/wav2letter_v0.2/inference/inference/module/feature/feature.h I tried various ways to fix the path's errors, in the end the one that worked best was adding this: Then I get this error from a truly non-existent file In file included from /home/empresa/wav2letter_v0.2/inference/inference/module/nn/backend/fbgemm/fbgemm.h:11:0, It will be that I must use some special configuration option somewhere? Thank's in advance |
@Adportas: The following are the CMake options for my build: -DW2L_BUILD_TESTS=OFF -DW2L_INFERENCE_BUILD_TESTS=OFF -DW2L_BUILD_TOOLS=ON -DW2L_BUILD_INFERENCE=ON -DW2L_INFERENCE_BACKEND=fbgemm Also, make sure you have the right version of Flashlight (when in doubt either use the Docker container or the instructions in the Dockerfile and replicate them on your machine). There's something around checking out a specific branch of Flashlight and installing contrib packages - just follow instructions in the Dockerfile, if you are having trouble. Yes, the The repository and the branch |
Hi @abhinavkulkarni I1124 13:37:44.484884 16905 StreamingTDSModelConverter.cpp:192] Number of classes (network): 45 Which seem to be referenced in that previous post with broken usefull links inside unfortunately. streaming_tds_model_converter error #646 Summary -> "We support only TDS based modules for streaming inference at the moment"
I guess it would not be tds and I have to change it to that mode, I will try with this model I hope it works
Finally i will leave the steps i use to compile and try the streaming_tds_model_converter in case they help: Install Docker ./streaming_tds_model_converter -am Daniel/001_model_last.bin --outdir Daniel/Resultado NOTE: I had to recreate some paths and copy referenced files of the model in the docker image with combination of "mkdir -p" and "sudo docker cp" |
@Adportas: Not sure if you were able to run the TDS converter, but here's a sample run from my machine: $ /home/w2luser/Projects/wav2letter/cmake-build-debug-fbgemm/tools/streaming_tds_model_converter --am /data/podcaster/model/wav2letter/am_500ms_future_context_dev_other/am_500ms_future_context_dev_other.bin --outdir /home/w2luser/models --flagsfile /home/w2luser/Projects/wav2letter/recipes/models/streaming_convnets/librispeech/train_am_500ms_future_context.cfg --logtostderr=1
I1203 21:45:45.544514 35115 StreamingTDSModelConverter.cpp:152] [Network] Reading acoustic model from /data/podcaster/model/wav2letter/am_500ms_future_context_dev_other/am_500ms_future_context_dev_other.bin
I1203 21:45:46.513530 35115 StreamingTDSModelConverter.cpp:157] [Network] Sequential [input -> (0) -> (1) -> (2) -> (3) -> (4) -> (5) -> (6) -> (7) -> (8) -> (9) -> (10) -> (11) -> (12) -> (13) -> (14) -> (15) -> (16) -> (17) -> (18) -> (19) -> (20) -> (21) -> (22) -> (23) -> (24) -> (25) -> (26) -> (27) -> (28) -> (29) -> (30) -> (31) -> (32) -> (33) -> (34) -> (35) -> (36) -> (37) -> (38) -> (39) -> output]
(0): View (-1 80 1 0)
(1): SpecAugment ( W: 80, F: 27, mF: 2, T: 100, p: 1, mT: 2 )
(2): Padding (0, { (5, 3), (0, 0), (0, 0), (0, 0), })
(3): Conv2D (1->15, 10x1, 2,1, 0,0, 1, 1) (with bias)
(4): ReLU
(5): Dropout (0.100000)
(6): LayerNorm ( axis : { 1 2 } , size : -1)
(7): Time-Depth Separable Block (9, 80, 15) [1200 -> 1200 -> 1200]
(8): Time-Depth Separable Block (9, 80, 15) [1200 -> 1200 -> 1200]
(9): Padding (0, { (7, 1), (0, 0), (0, 0), (0, 0), })
(10): Conv2D (15->19, 10x1, 2,1, 0,0, 1, 1) (with bias)
(11): ReLU
(12): Dropout (0.100000)
(13): LayerNorm ( axis : { 1 2 } , size : -1)
(14): Time-Depth Separable Block (9, 80, 19) [1520 -> 1520 -> 1520]
(15): Time-Depth Separable Block (9, 80, 19) [1520 -> 1520 -> 1520]
(16): Time-Depth Separable Block (9, 80, 19) [1520 -> 1520 -> 1520]
(17): Padding (0, { (9, 1), (0, 0), (0, 0), (0, 0), })
(18): Conv2D (19->23, 12x1, 2,1, 0,0, 1, 1) (with bias)
(19): ReLU
(20): Dropout (0.100000)
(21): LayerNorm ( axis : { 1 2 } , size : -1)
(22): Time-Depth Separable Block (11, 80, 23) [1840 -> 1840 -> 1840]
(23): Time-Depth Separable Block (11, 80, 23) [1840 -> 1840 -> 1840]
(24): Time-Depth Separable Block (11, 80, 23) [1840 -> 1840 -> 1840]
(25): Time-Depth Separable Block (11, 80, 23) [1840 -> 1840 -> 1840]
(26): Padding (0, { (10, 0), (0, 0), (0, 0), (0, 0), })
(27): Conv2D (23->27, 11x1, 1,1, 0,0, 1, 1) (with bias)
(28): ReLU
(29): Dropout (0.100000)
(30): LayerNorm ( axis : { 1 2 } , size : -1)
(31): Time-Depth Separable Block (11, 80, 27) [2160 -> 2160 -> 2160]
(32): Time-Depth Separable Block (11, 80, 27) [2160 -> 2160 -> 2160]
(33): Time-Depth Separable Block (11, 80, 27) [2160 -> 2160 -> 2160]
(34): Time-Depth Separable Block (11, 80, 27) [2160 -> 2160 -> 2160]
(35): Time-Depth Separable Block (11, 80, 27) [2160 -> 2160 -> 2160]
(36): Reorder (2,1,0,3)
(37): View (2160 -1 1 0)
(38): Linear (2160->9998) (with bias)
(39): View (9998 0 -1 1)
I1203 21:45:46.513664 35115 StreamingTDSModelConverter.cpp:158] [Criterion] ConnectionistTemporalClassificationCriterion
I1203 21:45:46.513669 35115 StreamingTDSModelConverter.cpp:159] [Network] Number of params: 115111823
I1203 21:45:46.513698 35115 StreamingTDSModelConverter.cpp:165] [Network] Updating flags from config file: /data/podcaster/model/wav2letter/am_500ms_future_context_dev_other/am_500ms_future_context_dev_other.bin
I1203 21:45:46.514137 35115 StreamingTDSModelConverter.cpp:174] Gflags after parsing
--flagfile=; --fromenv=; --tryfromenv=; --undefok=; --tab_completion_columns=80; --tab_completion_word=; --help=false; --helpfull=false; --helpmatch=; --helpon=; --helppackage=false; --helpshort=false; --helpxml=false; --version=false; --adambeta1=0.90000000000000002; --adambeta2=0.999; --am=/data/podcaster/model/wav2letter/am_500ms_future_context_dev_other/am_500ms_future_context_dev_other.bin; --am_decoder_tr_dropout=0; --am_decoder_tr_layerdrop=0; --am_decoder_tr_layers=1; --arch=am_500ms_future_context.arch; --archdir=/home/w2luser/Projects/wav2letter/recipes/models/streaming_convnets/librispeech; --attention=content; --attentionthreshold=0; --attnWindow=no; --attnconvchannel=0; --attnconvkernel=0; --attndim=0; --batchsize=8; --beamsize=2500; --beamsizetoken=250000; --beamthreshold=25; --blobdata=false; --channels=1; --criterion=ctc; --critoptim=sgd; --datadir=; --dataorder=input; --decoderattnround=1; --decoderdropout=0; --decoderrnnlayer=1; --decodertype=wrd; --devwin=0; --emission_dir=; --emission_queue_size=3000; --enable_distributed=true; --encoderdim=0; --eosscore=0; --eostoken=false; --everstoredb=false; --fftcachesize=1; --filterbanks=80; --flagsfile=/home/w2luser/Projects/wav2letter/recipes/models/streaming_convnets/librispeech/train_am_500ms_future_context.cfg; --framesizems=25; --framestridems=10; --gamma=1; --gumbeltemperature=1; --input=flac; --inputbinsize=100; --inputfeeding=false; --isbeamdump=false; --iter=1000000; --itersave=false; --labelsmooth=0; --leftWindowSize=50; --lexicon=/home/w2luser/w2l/am/librispeech-train+dev-unigram-10000-nbest10.lexicon; --linlr=-1; --linlrcrit=-1; --linseg=0; --lm=; --lm_memory=5000; --lm_vocab=; --lmtype=kenlm; --lmweight=0; --localnrmlleftctx=300; --localnrmlrightctx=0; --logadd=false; --lr=0.40000000000000002; --lr_decay=9223372036854775807; --lr_decay_step=9223372036854775807; --lrcosine=false; --lrcrit=0; --max_devices_per_node=8; --maxdecoderoutputlen=200; --maxgradnorm=0.5; --maxisz=33000; --maxload=-1; --maxrate=10; --maxsil=50; --maxtsz=9223372036854775807; --maxword=-1; --melfloor=1; --memstepsize=10485760; --mfcc=false; --mfcccoeffs=13; --mfsc=true; --minisz=200; --minrate=3; --minsil=0; --mintsz=2; --momentum=0; --netoptim=sgd; --noresample=false; --nthread=6; --nthread_decoder=1; --nthread_decoder_am_forward=1; --numattnhead=8; --onorm=target; --optimepsilon=1e-08; --optimrho=0.90000000000000002; --outputbinsize=5; --pctteacherforcing=100; --pcttraineval=1; --pow=false; --pretrainWindow=0; --replabel=0; --reportiters=1000; --rightWindowSize=50; --rndv_filepath=/checkpoint/vineelkpratap/experiments/speech/inference_tds//inference_paper_500ms_do0.1_lr0.4_G32_archtds_k10s_d8_p100m_do0.1_saug_mln_500ms.arch_bch8/rndvz.21621542; --rundir=[...]; --runname=inference_2019; --samplerate=16000; --sampletarget=0; --samplingstrategy=rand; --saug_fmaskf=27; --saug_fmaskn=2; --saug_start_update=-1; --saug_tmaskn=2; --saug_tmaskp=1; --saug_tmaskt=100; --sclite=; --seed=0; --show=false; --showletters=false; --silscore=0; --smearing=none; --smoothingtemperature=1; --softwoffset=10; --softwrate=5; --softwstd=5; --sqnorm=true; --stepsize=1000000; --surround=; --tag=; --target=tkn; --test=; --tokens=librispeech-train-all-unigram-10000.tokens; --tokensdir=/home/w2luser/w2l/am; --train=/home/w2luser/w2l/lists/train-clean-100.lst,/home/w2luser/w2l/lists/train-clean-360.lst,/home/w2luser/w2l/lists/train-other-500.lst,[DATA_DST_librilight]/lists/librilight.lst; --trainWithWindow=false; --transdiag=0; --unkscore=-inf; --use_memcache=false; --uselexicon=true; --usewordpiece=true; --valid=dev-clean:/home/w2luser/w2l/lists/dev-clean.lst,dev-other:/home/w2luser/w2l/lists/dev-other.lst; --validbatchsize=-1; --warmup=1; --weightdecay=0; --wordscore=0; --wordseparator=_; --world_rank=0; --world_size=32; --outdir=/home/w2luser/models; --alsologtoemail=; --alsologtostderr=false; --colorlogtostderr=false; --drop_log_memory=true; --log_backtrace_at=; --log_dir=; --log_link=; --log_prefix=true; --logbuflevel=0; --logbufsecs=30; --logemaillevel=999; --logfile_mode=436; --logmailer=/bin/mail; --logtostderr=true; --max_log_size=1800; --minloglevel=0; --stderrthreshold=2; --stop_logging_if_full_disk=false; --symbolize_stacktrace=true; --v=0; --vmodule=;
I1203 21:45:46.533406 35115 StreamingTDSModelConverter.cpp:192] Number of classes (network): 9998
Skipping View module: V -1 NFEAT 1 0
Skipping SpecAugment module: SAUG 80 27 2 100 1.0 2
Skipping Dropout module: DO 0.1
Skipping Dropout module: DO 0.1
Skipping Dropout module: DO 0.1
Skipping Dropout module: DO 0.1
Skipping Reorder module: RO 2 1 0 3
Skipping View module: V 2160 -1 1 0
Skipping View module: V NLABEL 0 -1 1
I1203 21:45:54.853623 35115 StreamingTDSModelConverter.cpp:289] Serializing acoustic model to '/home/w2luser/models/acoustic_model.bin'
I1203 21:46:00.994504 35115 StreamingTDSModelConverter.cpp:301] Writing tokens file to '/home/w2luser/models/tokens.txt'
I1203 21:46:01.005759 35115 StreamingTDSModelConverter.cpp:328] Serializing feature extraction model to '/home/w2luser/models/feature_extractor.bin'
I1203 21:46:01.710419 35115 StreamingTDSModelConverter.cpp:344] verifying serialization ...
I1203 21:46:03.194089 35115 StreamingTDSModelConverter.cpp:372] Done !
Process finished with exit code 0 |
Hi, I have tried
Then, I change the
But, the same error comes up again. In addtion, I tried wav2letter v0.2
Maybe I have missed something. Any help will be appreciate. Thanks. |
@xiaosdawn: Have you checked if any of the pre-built Docker images |
I didn't find any pre-built Docker images |
@xiaosdawn: You may want to check pre-built Docker images detailed here: https://github.com/facebookresearch/wav2letter/wiki/Building-Running-with-Docker The ones used for training should have the binary built. |
Ok, thanks. |
Thank you @abhinavkulkarni .
So the Thanks again. |
Hi, sorry to have bothered you again.
Hope you show me some advice continuely. Any suggestion will be appreciate. Here is my
and the
|
cc @vineelpratap could you navigate here with latest wav2letter/flashlight? Otherwise @xiaosdawn you needd to use docker built at time of branch v0.2 before we did refactor of the whole code base and merged flashlight and wav2letter. |
Thanks for the continued help.
Then, in the container:
But, I got the same errors as above:
|
Inside Dockerfile it is used latest master of flashlight. You need to fix Dockerfile to use flashlight with v0.2 branch too. |
Inside Dockerfile, I checked flashlight with v0.2 branch:
But, the error is the same as above:
Is there a specific flashlight version to train the |
Maybe I misunderstood but what I see now:
|
All yes. Thanks again. I'll try more.
|
Hi, We are working to fix this in - #930 so that you don't need to do any hacks like above... |
Hi,
Where is that file -> tools/StreamingTDSModelConverter.cpp
I need it to transform the model so I can transcribe ... but I can't find it in the github repository of w2l
Thank's in advance
Daniel
The text was updated successfully, but these errors were encountered: