AudioCaption
AudioCaption copied to clipboard
Dcase2021
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?
Which hyperparameters are missing?
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:
The DCASE2021 branch uses captioning/ignite_runners/run.py
instead of captioning/pytorch_runners/run.py
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:
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.
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?
Configuration updated and you can try again.