MCPcopy Create free account
hub / github.com/FunAudioLLM/FunMusic / plot_spectrogram

Function plot_spectrogram

inspiremusic/utils/tokenizer_utils.py:169–178  ·  view source on GitHub ↗
(spectrogram)

Source from the content-addressed store, hash-verified

167
168
169def plot_spectrogram(spectrogram):
170 fig, ax = plt.subplots(figsize=(10, 2))
171 im = ax.imshow(
172 spectrogram, aspect="auto", origin="lower", interpolation='none')
173 plt.colorbar(im, ax=ax)
174
175 fig.canvas.draw()
176 plt.close()
177
178 return fig
179
180
181def init_weights(m, mean=0.0, std=0.01):

Callers

nothing calls this directly

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected