示例#1
0
文件: Main.py 项目: chuckgu/RNN
i=20
plt.close('all')
fig = plt.figure()
ax1 = plt.subplot(311)
plt.plot(seq[:,i])
plt.grid()
ax1.set_title('input')
ax2 = plt.subplot(312)

plt.scatter(xrange(time_steps_y), targets[i], marker = 'o', c = 'b')
plt.grid()

a=seq[:,i]
b=seq[:, i][:, np.newaxis]
guess = model.gen_sample(b)

aa=guess[1]

guess=np.asarray(guess[0],dtype=np.float).reshape((10,3))




guessed_probs = plt.imshow(guess.T, interpolation = 'nearest', cmap = 'gray')
ax2.set_title('blue points: true class, grayscale: model output (white mean class)')

ax3 = plt.subplot(313)
plt.plot(model.errors)
plt.grid()
ax3.set_title('Training error')
示例#2
0
文件: Main.py 项目: rubeeny/RNN
i = 20
plt.close('all')
fig = plt.figure()
ax1 = plt.subplot(311)
plt.plot(seq[:, i])
plt.grid()
ax1.set_title('input')
ax2 = plt.subplot(312)

plt.scatter(xrange(time_steps_y), targets[i], marker='o', c='b')
plt.grid()

a = seq[:, i]
b = seq[:, i][:, np.newaxis]
guess = model.gen_sample(b)

aa = guess[1]

guess = np.asarray(guess[0], dtype=np.float).reshape((10, 3))

guessed_probs = plt.imshow(guess.T, interpolation='nearest', cmap='gray')
ax2.set_title(
    'blue points: true class, grayscale: model output (white mean class)')

ax3 = plt.subplot(313)
plt.plot(model.errors)
plt.grid()
ax3.set_title('Training error')
'''
示例#3
0
else:
    model.load('encdec_new.pkl')

i = 20
plt.close('all')
fig = plt.figure()
ax1 = plt.subplot(311)
plt.plot(seq[i])
plt.grid()
ax1.set_title('input')
ax2 = plt.subplot(312)

plt.scatter(xrange(time_steps_y), targets[i], marker='o', c='b')
plt.grid()

guess = model.gen_sample(seq[i])

aa = guess[1]

guess = np.asarray(guess[0], dtype=np.float).reshape((10, 3))

guessed_probs = plt.imshow(guess.T, interpolation='nearest', cmap='gray')
ax2.set_title(
    'blue points: true class, grayscale: model output (white mean class)')

ax3 = plt.subplot(313)
plt.plot(model.errors)
plt.grid()
ax3.set_title('Training error')
'''
示例#4
0
文件: Main.py 项目: chuckgu/RNN
else:
    model.load("encdec_new.pkl")

i = 20
plt.close("all")
fig = plt.figure()
ax1 = plt.subplot(311)
plt.plot(seq[i])
plt.grid()
ax1.set_title("input")
ax2 = plt.subplot(312)

plt.scatter(xrange(time_steps_y), targets[i], marker="o", c="b")
plt.grid()

guess = model.gen_sample(seq[i])

aa = guess[1]

guess = np.asarray(guess[0], dtype=np.float).reshape((10, 3))


guessed_probs = plt.imshow(guess.T, interpolation="nearest", cmap="gray")
ax2.set_title("blue points: true class, grayscale: model output (white mean class)")

ax3 = plt.subplot(313)
plt.plot(model.errors)
plt.grid()
ax3.set_title("Training error")