AudioCaption icon indicating copy to clipboard operation
AudioCaption copied to clipboard

Dcase2021

Open qipotianMFXT opened this issue 1 year ago • 7 comments

Excuse me, in the branch of dcase2021, it seems that there are some missing hyperparameters in both the dcase2021_xe.yaml and dcase2021_scst.yaml configuration files. Could you please provide the complete configuration files?

qipotianMFXT avatar Jun 24 '23 12:06 qipotianMFXT

Which hyperparameters are missing?

wsntxxn avatar Jun 24 '23 12:06 wsntxxn

Thank you for your reply! For example,there are some codes in class Runner in run.py

def _get_model(config, outputfun=sys.stdout): vocabulary = config["vocabulary"] encoder = getattr( encoder1, config["encoder"])( config["data"]["raw_feat_dim"], config["data"]["fc_feat_dim"], config["data"]["attn_feat_dim"], **config["encoder_args"] ) Therefore,not only the structure of config in your dcase2021 should change,but also some hyperparameters need to be added.

data:      total_iters:      zh: False      raw_feat_dim:      fc_feat_dim:      attn_feat_dim:

qipotianMFXT avatar Jun 24 '23 13:06 qipotianMFXT

The DCASE2021 branch uses captioning/ignite_runners/run.py instead of captioning/pytorch_runners/run.py

wsntxxn avatar Jun 24 '23 15:06 wsntxxn

Although in https://github.com/wsntxxn/AudioCaption/blob/dcase2021/captioning/ignite_runners/run.py, these hyperparameters also lack. class Runner(BaseRunner): @staticmethod def _get_model(config, outputfun=sys.stdout): vocabulary = config["vocabulary"] encoder = getattr( captioning.models.encoder, config["encoder"])( config["data"]["raw_feat_dim"], config["data"]["fc_feat_dim"], config["data"]["attn_feat_dim"], **config["encoder_args"] ) These hyperparameters also need to be added. data:     total_iters:     zh: False     raw_feat_dim:     fc_feat_dim:     attn_feat_dim:

qipotianMFXT avatar Jun 25 '23 07:06 qipotianMFXT

These are automatically generated during training: https://github.com/wsntxxn/AudioCaption/blob/dcase2021/captioning/ignite_runners/run.py#L122, https://github.com/wsntxxn/AudioCaption/blob/dcase2021/captioning/ignite_runners/run.py#L297.

wsntxxn avatar Jun 25 '23 07:06 wsntxxn

These are automatically generated during training: https://github.com/wsntxxn/AudioCaption/blob/dcase2021/captioning/ignite_runners/run.py#L122, https://github.com/wsntxxn/AudioCaption/blob/dcase2021/captioning/ignite_runners/run.py#L297.

I'm so sorry to bother you another time. In the code of dcase2021, performing "prepare data" operations does not affect the config, and when executing the training script, it is necessary to use the fire to execute the Runner class first. The static method _get_model in the Runner class needs to be based on the raw_feat_dim, fc_feat_dim, and attn_feat_dim under the data configuration file. When I tried to reproduce your code for Dcase 2021, I found that when executing "python ignite_runners\run.py train config\dcase2021\dcase2021_xe.yaml", it indeed reported a KeyError: 'data' error. So, could you please check it again?

qipotianMFXT avatar Jun 26 '23 07:06 qipotianMFXT

Configuration updated and you can try again.

wsntxxn avatar Jun 27 '23 04:06 wsntxxn