yeyupiaoling / PPASR

基于PaddlePaddle实现端到端中文语音识别,从入门到实战,超简单的入门案例,超实用的企业项目。支持当前最流行的DeepSpeech2、Conformer、Squeezeformer模型
Apache License 2.0
824 stars 129 forks source link

Expected version == 0U, but received version:1904018048 != 0U:0.] (at ..\paddle\fluid\framework\lod_tensor.cc:301) #173

Closed xixingshu closed 9 months ago

xixingshu commented 10 months ago

(InvalidArgument) Deserialize to tensor failed, maybe the loaded file is not a paddle model(expected file format: 0, but 1904018048 found). [Hint: Expected version == 0U, but received version:1904018048 != 0U:0.] (at ..\paddle\fluid\framework\lod_tensor.cc:301) [operator < load_combine > error] 您好,我的环境是CUDA12.0,下的是2.6GPU环境下的paddlepaddle包,模型训练完以后,运行的时候报了上面的错,可以提供一些帮助吗?

xixingshu commented 10 months ago
F:\python310\lib\site-packages\paddleaudio\_extension.py:141: UserWarning: paddleaudio C++ extension is not available.
  warnings.warn("paddleaudio C++ extension is not available.")
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:15 - ----------- 额外配置参数 -----------[2024-01-25 14:20:09 INFO   ] utils:print_arguments:17 - configs: PPASR/configs/conformer.yml[2024-01-25 14:20:09 INFO   ] utils:print_arguments:17 - host: 127.0.0.1
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:17 - model_path: models/conformer_streaming_fbank/infer
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:17 - port_server: 5000
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:17 - port_stream: 5001
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:17 - pun_model_dir: 
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:17 - use_gpu: True
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:17 - use_pun: False
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:17 - use_server: False
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:18 - ------------------------------------------------
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:20 - ----------- 配置文件参数 -----------[2024-01-25 14:20:09 INFO   ] utils:print_arguments:23 - ctc_beam_search_decoder_conf:
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        alpha: 2.2
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        beam_size: 300
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        beta: 4.3
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        cutoff_prob: 0.99
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        cutoff_top_n: 40
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        language_model_path: lm/zh_giga.no_cna_cmn.prune01244.klm
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        num_processes: 10
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:23 - dataset_conf:
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        batch_size: 16
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        dataset_vocab: PPASR/dataset/vocabulary.txt
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        manifest_type: txt
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        max_duration: 20
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        mean_istd_path: PPASR/dataset/mean_istd.json
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        min_duration: 0.5
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        noise_manifest_path: PPASR/dataset/manifest.noise
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        num_workers: 4
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        prefetch_factor: 2
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        test_manifest: PPASR/dataset/manifest.test
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        train_manifest: PPASR/dataset/manifest.train
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        use_shared_memory: True      
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:32 - decoder: ctc_beam_search
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:23 - decoder_conf:
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        attention_heads: 4
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        dropout_rate: 0.1
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        linear_units: 1024
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        num_blocks: 3
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        positional_dropout_rate: 0.1 
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        r_num_blocks: 3
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        self_attention_dropout_rate: 
0.1
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        src_attention_dropout_rate: 0.1
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:23 - encoder_conf:
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        activation_type: swish       
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        attention_dropout_rate: 0.1  
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        attention_heads: 4
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        cnn_module_kernel: 15        
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        dropout_rate: 0.1
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        input_layer: conv2d6
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        linear_units: 2048
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        normalize_before: True       
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        num_blocks: 12
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        output_size: 256
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        pos_enc_layer_type: rel_pos  
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        positional_dropout_rate: 0.1 
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        use_cnn_module: True
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:32 - metrics_type: cer
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:23 - model_conf:
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        ctc_weight: 0.3
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        length_normalized_loss: False[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        lsm_weight: 0.1
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        reverse_weight: 0.3
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:23 - optimizer_conf:
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        learning_rate: 0.001
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        optimizer: Adam
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        scheduler: WarmupLR
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:26 -        scheduler_conf:
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:28 -                min_lr: 1e-05        
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:28 -                warmup_steps: 25000  
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        weight_decay: 1e-06
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:23 - preprocess_conf:
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        feature_method: fbank        
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        n_mels: 80
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        n_mfcc: 40
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        sample_rate: 16000
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        target_dB: -20
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        use_dB_normalization: True   
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:32 - streaming: True
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:23 - train_conf:
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        accum_grad: 4
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        enable_amp: False
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        grad_clip: 5.0
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        log_interval: 1
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:30 -        max_epoch: 2
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:32 - use_model: conformer
[2024-01-25 14:20:09 INFO   ] utils:print_arguments:33 - ------------------------------------------------
======================================================================
初始化解码器...
language model: model path = lm/zh_giga.no_cna_cmn.prune01244.klm, is_character_based = True, max_order = 5, dict_size = 0

初始化解码器完成! 这是前面正常运行的日志

yeyupiaoling commented 9 months ago

我也看不出是什么问题?试试2.5.1版本的paddlepaddle,最好用conda安装