Open cortner opened 1 year ago
In light of some recent changes to the abstract type hierarchy (CC @CheukHinHoJerry ) maybe this can now be re-designed? Basically what happens is that different classes of bases now put different meanings to the term SINGLE and BATCH. This will surely help here.
maybe some meta-programming ... ?
@CheukHinHoJerry -- I was thinking about the following:
A matrix A
can be a single input or it can be a batch of inputs. Therefore we need to be able to label what it is. I propose to introduce a wrapper type Batch
that identifies when an array is a batch as opposed to a single input. Then the batched evaluation can dispatch on that. E.g.
rr = # Vectors of input radial distances
Rn = # radial basis
evaluate(Rn, Batch(rr))
# output will be a `Batch{Matrix}` rather than a `Matrix`
(or something along those lines) What do you think of this?
How do the most common ML frameworks deal with that?
Sorry for missing that in early Jun. What you mentioned sounds right. I will mull this over a little while and get back to you tonight.
Should we also consider this together with what we want to do in https://github.com/ACEsuit/Polynomials4ML.jl/issues/18#issue-1693166039?
Can we at the same time drop all codes that with only single input, reshape PtrArray for free and label the output array as what you have mentioned? This makes a lot of sense to me.
you are right, this is closely related.
Maybe we can add this issue to our discussion with @tjjarvinen
Before we rewrite anything maybe we should first discuss this?
CC @tjjarvinen
is there a solution to this ambiguity?
It is maybe not so important because of this: