Speech-enhancement icon indicating copy to clipboard operation
Speech-enhancement copied to clipboard

ValueError: Cannot feed value of shape (256, 9, 129) for Tensor 'model/labels:0', which has shape '(

Open MayMiao0923 opened this issue 6 years ago • 6 comments

When I ran the main.py , the following error occurred. 001 When I ran the main.py, the following error occurred.At this point, the model used is fnn. 003 Later, when I checked the fnn model in the trnmodle.py, I found the cause of the error. 002 However, I did not modify the parameters or commands in the datareader.py. and the same error occurred when I used the lstm model. ValueError: Cannot feed value of shape (256, 9, 129, 1) for Tensor 'model/inputs:0', which has shape '(?, 129, 1, 1)' 004 005 However, my RAW file is made using the MATLAB program you gave, for example 006 Excuse me, what should I do to solve this problem?Is there any wrong operation when I am making RAW files? I made all the voices in the TRAIN folder in TIMIT into the RAW files needed in the SE, and did not set the verification file. And I read your paper. The neural network used in the TSN algorithm you proposed in the paper is DNN. Is that right? @jtkim-kaist

MayMiao0923 avatar Jul 04 '19 09:07 MayMiao0923

  1. The problem occurs from the mismatch of datareader and model's placeholder. According to your debugging, the datareader outputs the dnn's inputs but the model is set to lstm.

Please verify your log directory is clean, if not, the program automatically re-load previous model so that mismatch can occur.

  1. Yes, in partial. TSN consists of DNN (pri-NN) and CNN (post-NN).

I'm really sorry about your effort because of code problems. Cheer up and If you have another question, please tagging me again.

jtkim-kaist avatar Jul 07 '19 06:07 jtkim-kaist

Also the first problem you mentioned is not the code problem, but some environmental problem. How about changing your environment to ubuntu 16.04 from window? Actually, all of my projects were run in ubuntu 16.04 so I cannot expect my project will run in window correctly. Also, my co-workers had not suffered from code problems to run this project in ubuntu environment.

jtkim-kaist avatar Jul 07 '19 06:07 jtkim-kaist

Do you mean that the two mode models should be defined the same when I run the code? Is it the form in the picture below? 捕获28

I will try to run your project in the ubantu environment, if I have any questions, I will ask you again. thanks for your help. @jtkim-kaist

MayMiao0923 avatar Jul 07 '19 08:07 MayMiao0923

Or, I need to modify the config.mode=="lstm" and config.mode=="tsn" commands in the datareader. In other words, when I use the following in the config.py file, do I need to ensure that the mode in config.py should be lstm instead of fnn? in datareader.py is 捕获29 At this time, mode is lstm In config.py, do I need to change mode='fnn" to mode="lstm? such as, 捕获30

MayMiao0923 avatar Jul 07 '19 10:07 MayMiao0923

@jtkim-kaist

MayMiao0923 avatar Jul 07 '19 10:07 MayMiao0923

Don't change the code and at first, just set mode='fnn' (basic mode) and in main.py try to set reset=True, train_reset=True, test_only=False

Also, clean your files in logs. and remove some .npy in your data directory (if .npy exists)

jtkim-kaist avatar Jul 07 '19 15:07 jtkim-kaist