Views
No views yet
@inproceedings{zhao2025let,
title={Let Network Decide What to Learn: Symbolic Music Understanding Model Based on Large-scale Adversarial Pre-training},
author={Zhao, Zijian},
booktitle={Proceedings of the 2025 International Conference on Multimedia Retrieval},
pages={2128--2132},
year={2025}
}./Data/output_pretrain.git clone https://huggingface.co/RS2002/Adversarial-MidiBERTmodel.py and Octuple.pkl files are located in the same folder.1import torch
2from model import Adversarial_MidiBERT
3
4# Load the model
5model = Adversarial_MidiBERT.from_pretrained("RS2002/Adversarial-MidiBERT")
6
7# Example input
8input_ids = torch.randint(0, 10, (2, 1024, 8))
9attention_mask = torch.zeros((2, 1024))
10
11# Forward pass
12y = model(input_ids, attention_mask)
13print(y.last_hidden_state.shape) # Output: [2, 1024, 768]