-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
- The state tensor
ushould be generalisable to a nd-tensor, but I've only really tested it as a 1d vector, need to add tests to make sure nd works ok. The state tensorushould still be fully dense - once I'm happy with
uas an nd-tensor, addingim2colandcol2imfunctions would be useful for convolution operations. could restrict this to dense inputs/outputs. Note, actually this isn't as good since you do it on the state which changes at each iteration, you want to do the operation of the kernel which doesn't change, sok2spis a preference - also add
k2spas a function to transform a constant (non time depenent but could be param dependent) nd sparse/dense kernel to a 2d sparse matrix for matrix vector multiplications ala finite difference. I'm not sure how to do this for nd, so might have to specialise for each dimension: 1, 2, 3 and fail for d > 3. - Would also need operators to construct initial conditions, should be able to use indices in expressions e.g. x_i {(0:20): i / 20.0 }
- and define constant integers for repeated use: int N = 20 x_i { (0:N): i / N }
- or could just fuse
im2col, matmul, thencol2imas a single functionconv, i.e.a_ij { conv(k_ab, b_ij) }ora_ij { k_ab ⊗ b_ij. The conv has various meta-parameters, e.g. padding, not sure how to include these
Metadata
Metadata
Assignees
Labels
No labels