# Get the loss values
loss_values = event_acc.Scalars('train_loss')

# Separate the step numbers and the loss values into two lists
steps = [val.step for val in loss_values]
losses = [val.value for val in loss_values]

# Plot the loss values
plt.figure(figsize=(10, 6))
plt.plot(steps, losses)
plt.xlabel('Step')
plt.ylabel('Loss')
plt.show() how to limit the y range from a to b



 In your response, capitalize a few words to stress main points. Please limit the number of words with all capital letters to less than 7.
user