Skip to content

Tensor to ndarray: surrogates.utils.sequential_posterior - candidates shape and reshaping #154

Closed Answered by Scienfitz
rjavadi asked this question in Q&A
Discussion options

You must be logged in to vote

hmm I'm not sure that was correct, I think its more like: anything that is used inside acquisition can keep using torch. While the surrogates are strictly speaking not derived of acquisition, they are only ever needed if acquisition is also used so I guess it would be fine to keep them having torch (lazy)

Re your original question:
Did you try with reshape?
ie a ndarray of shape [2,4,3,4] would normally be flattened to [96] but you could just flatten everything except the last dimensions (according to what end_dim was chosen), for example here end_dim=-2 ignoring the last dimension resulting in shape [24, 4]. I would hope this creates the right order

We need to keep in mind the performanc…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@AVHopp
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Scienfitz
Comment options

Answer selected by rjavadi
@rjavadi
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed question Further information is requested
3 participants