| 37 | |
| 38 | |
| 39 | def checkDataShape(xData, x_params_data, yData): |
| 40 | if not len(xData.shape) == 2: |
| 41 | print("Expected tensor of rank 2 for xData") |
| 42 | print("xData shape =", xData.shape) |
| 43 | sys.exit() |
| 44 | if not len(x_params_data.shape) == 2: |
| 45 | print("Expected tensor of rank 2 for x_params_data") |
| 46 | print("x_params_data shape =", x_params_data.shape) |
| 47 | sys.exit() |
| 48 | if not len(yData.shape) == 2: |
| 49 | print("Expected tensor of rank 2 for yData") |
| 50 | print("yData shape =", yData.shape) |
| 51 | sys.exit() |
| 52 | |
| 53 | |
| 54 | def check_loss_component_dim(terms, string): |