Would tile then ravel work?
http://deeplearning.net/software/theano/library/tensor/basic.html#theano.tensor.tile

It looks like you're trying to turn a length n vector into a shape (n, 
1024) matrix by repeating each element of the vector then raveling. If this 
is accuracte, tile should work for repeating.

On Tuesday, July 12, 2016 at 12:17:07 AM UTC-7, Lindley Lentati wrote:
>
> Hi, I'm trying to implement an equivalent of the following:
>
>
> NVec = np.array([np.ones(1024)*sig for sig in noise]).flatten()
> Offs = np.array([np.ones(1024)*off for off in offset]).flatten()
> Amps = np.array([np.ones(1024)*amp for amp in amplitude]).flatten()
>
> where noise, offset, and amplitude are theano vectors that contain free 
> parameters from a PyMC3 likelihood. When i try and do this I get the 
> following:
>
> ValueError: length not known: offset [id A]
>
> which I assume is because these vectors have no notion of length right? 
> I'm just wondering what the equivalent expression would be for use in 
> theano. 
>
>
> So far the closest i've gotten is creating a list of tensors:
>
> [theano.tensor.ones(1024)*noise[i] for i in range(useToAs)] 
>
> but I cant seem to get them to concatenate into a single tensor.
>
>
> If it helps, I know the length of everything before hand.. Apologies if 
> this is documented all over the place, I couldn't find an example that I 
> could translate into what I wanted to do.
>
>
> Many Thanks
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to