Plotting 3D data with validator plotter

I was trying to plot validator results for data with 3 inputs (“x”, “y” and “t”) . The following variables were mapped to the corresponding columns of input csv file for validation.

mapping = {“time”: “t”, “x”: “x”, “r”: “y”, “Psi”: “Phi_2” }
csv_var = csv_to_dict(
to_absolute_path(“file.csv”), mapping
csv_invar_numpy = {
key: value for key, value in csv_var.items() if key in [“t”,“x”,“y”]
csv_outvar_numpy = {
key: value for key, value in csv_var.items() if key in [“Phi_2”]

Validator of the following form was defined. The default ValidatorPlotter() was used here.

csv_validator = PointwiseValidator(

The default ValidatorPlotter class is capable of handling dimensions <= 2 only. The following message is displayed while training the model.

[09:27:45] - [step: 0] record constraint batch time: 4.232e-01s
Default plotter can only handle <=2 input dimensions, passing
[09:27:45] - [step: 0] record validators time: 2.474e-01s

Are there other validator plotters in modulus which can take care of such problems? Also, is there a way to freeze one of the dimensions to enforce variation along the remaining two dimensions only? I tried removing the “y” dimension, but that lead to graph unrolling error due to insufficient number of specified inputs.

Hi @shubhamsp2195

Unfortunately no, the built in plotter for Tensorboard can only handle up to 2 dimensions. We put this limitation in since 3D data can arrive in different forms. You will likely need to define a custom validator method to do plotting of 3D data. An example that does this is the super-resolution turbulence problem where we output to a VTI format for viewing in para-view.

1 Like