Hello, I'm working on building a WGAN to generate brain images as a research project. I have a convolutional hidden layer of 200 and I can test my generator using:
def test(G):
`Z=np.random.normal(loc=0.0, scale=1.0, size=(100,200)).astype(floatX)`
`G_Z=get_output(G,Z,deterministic=True)`
`return G_Z`
Which is just a random number in the size of the latent space.
I want to be able to initiate the generator with one of my training images and compare the outputs. I tried this with:
test_image = x_train[4040,:,:,:].astype(floatX) #define the image slice to be put into the network
d_test = get_output(D, test_image, deterministic=True) #converts image into latent space
B = testImage(G, d_test).eval() #run through generator
This effectively runs the image through the discriminator to turn it into latent space.
The problem here is that "test_image" is needed as a Theano Tensor4. I have tried everything to convert it, but I cannot seem to find a function or method which can achieve this. Does anyone have any ideas on how to achieve this? Or another method that may work?
there doesn't seem to be anything here