Esempio n. 1
0
 def get_ball():
     return make_ball_gif(n_frames=n_time_steps,
                          f_height=f_height,
                          f_width=f_width,
                          ball_size=ball_size,
                          max_1=True,
                          vector_output=True)
Esempio n. 2
0
    #     combined.append(x_reconstruct[i])
    #     combined.append(x_reconstruct[i+1])
    #     combined.append(x_reconstruct[i+2])

    # kargs = { 'duration': .8 }
    # imageio.mimsave(home+"/Downloads/comb_gif.gif", combined, 'GIF', **kargs)





    #PREDICT

    batch = []
    while len(batch) != batch_size:
        frame=make_ball_gif(n_frames=1, f_height=f_height, f_width=f_width, ball_size=ball_size, max_1=True, vector_output=True)
        batch.append(frame)

    batch = np.array(batch)
    batch = np.reshape(batch, [batch_size, 1 , f_height*f_width])
    print batch.shape

    # predicted = vae.call_predict_next(batch)

    # print predicted.shape

    # together = [batch[0][0], predicted[0]]
    # together = np.array(together)
    # together = np.reshape(together, [2, f_height,f_width, 1])
    # for i in range(len(together)): 
    #     together[i] = together[i] * (255. / np.max(together[i]))
Esempio n. 3
0
from __future__ import absolute_import
# from __future__ import print_function
import matplotlib.pyplot as plt

import autograd.numpy as np
import autograd.numpy.random as npr
import autograd.scipy.stats.norm as norm

# from black_box_svi import black_box_variational_inference
from autograd.optimizers import adam

from ball_sequence import make_ball_gif

sequence, action_list = (make_ball_gif())

print sequence.shape