0

I have some diagrams using TensorBoard, and I want to plot them and then save them as images. How can I do this? Is it possible?

I tried:

data = np.genfromtxt("C:\Users\maedeh\Downloads\val_model_31_mean_absolute_error.csv",
                 delimiter=',', skip_header=10,
                 skip_footer=10, names=['x', 'y', 'z'])

but it produced this error:

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

Can you please help?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
maedeh
  • 105
  • 2
  • 10
  • By default np.genfromtxt uses dtype=float. You can ask np.genfromtxt to try to guess the actual type of your columns by using dtype=None. Can you share some of the data inside your .csv file. – gogasca Oct 04 '18 at 19:41
  • Please print a few lines of your `.csv` file. Is this .csv file, generated by download link in tensorboard GUI? – M. Doosti Lakhani Oct 05 '18 at 16:23
  • yes, I print some of the lines here. Wall time Step Value 1538599140 0 0.27923739 1538599153 1 0.247721538 1538599166 2 0.242293626 1538599178 3 0.23922807 – maedeh Oct 08 '18 at 19:46
  • For this `SyntaxError`, Can you try escaping the backslashes in the file path, You can refer to this [comment](https://stackoverflow.com/a/37402939/11530462) for more details on the same. Thanks! –  Mar 04 '22 at 05:39

0 Answers0