From 387f7a490e3b436f609a2dd65e62c98b7d6d4f4e Mon Sep 17 00:00:00 2001 From: John Loverich Date: Sat, 15 Jun 2024 13:30:41 -0700 Subject: [PATCH] Simplify PiecewiseDiscontinuousExpand --- high_order_layers_torch/Basis.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/high_order_layers_torch/Basis.py b/high_order_layers_torch/Basis.py index 6f9588c..6346e17 100644 --- a/high_order_layers_torch/Basis.py +++ b/high_order_layers_torch/Basis.py @@ -283,9 +283,7 @@ def __call__(self, x): mat_trans[windex, wrange.view(-1)] = out.flatten() mat = mat_trans.reshape( mat.shape[0], mat.shape[1], mat.shape[2], mat.shape[3], mat.shape[4] - ) - - mat = mat.permute(4, 0, 1, 2, 3) + ).permute(4, 0, 1, 2, 3) return mat