pennpolygons / cv-boilerplate

Open-source boilerplate for computer vision research
MIT License
16 stars 2 forks source link

huge commit of the regression demo + vector_to_visdom + multiple line… #40

Closed mchiquier closed 4 years ago

mchiquier commented 4 years ago

…s feature

In order to checkout the regression example, run : python train.py example=regression -m . The results will plot in "main".

Things left to be done:

-extend the "multiple line plots in one plot" feature to number_to_visdom -option to pass in x_value -option to make a scatter plot -figure out the path to the data so that it works regardless of whether you use -m or not.

The reason I waited for the x_value + scatter_plot thing is that I think it would make more sense for the vision community to see an example of a scatter updating in during training for a distribution. for example, how well normalizing flows captures a distribution over time. There is some good code for this here (https://github.com/tonyduan/normalizing-flows/blob/master/examples/flow_2d.py) but I am now tired and will not do it today lol. Also, I will do the path thing tomorrow morning, but for now test it with the "-m" flag.

goodmattg commented 4 years ago

Okay so I've fixed a lot of the issues. Is there a reason I get this error when I'm training. I get a plot in Visdom, and the data files load correctly.

File "research/train.py", line 217, in _inference "ypred_first": np.array([y[0], y_pred[0]]), ValueError: only one element tensors can be converted to Python scalars