Errors in superconducting quantum chips are inevitable for developing robust logical qubits and implementing complex quantum algorithms. These errors arise from various physical mechanisms, each with unique dependence on qubit frequencies. Here, we propose an algorithm for optimizing qubit frequencies to effectively mitigate multiple types of frequency-dependent errors. We employ multichannel message-passing neural networks, with each channel tailored to address a specific error type. Our neural-network model is trained to minimize the weighted sum of different errors, based on frequency-dependent error models, e.g., two-level-system defects that affect individual qubits, quantum crosstalk that depends on the graph structure formed by qubit couplings, and microwave crosstalk that relies on the spatial arrangement of qubits. The trained neural-network model is adaptable to chips with varying qubit arrangements and scales. Recognizing the diverse experimental conditions of different chips, we compare our algorithm with the snake algorithm across various scales and error weights, providing valuable guidance for experimenters in algorithm selection. Our results show that, in most scenarios, our algorithm achieves lower overall errors than the snake algorithm.