hardmaru / WorldModelsExperiments

World Models Experiments
608 stars 171 forks source link

cannot reshape array of size 51529 into shape (227,227,3) #15

Closed 0zymandias11 closed 5 years ago

0zymandias11 commented 5 years ago

import matplotlib.pyplot as plt

test_data = process_test_data() test_data = np.load('test_data.npy')

fig=plt.figure()

for num,data in enumerate(test_data[:12]):

img_num = data[1]
img_data = data[0].reshape(-1,IMG_SIZE,IMG_SIZE,3)

y = fig.add_subplot(3,4,num+1)
orig = img_data
data = img_data
model_out = model.predict([data])[0]

if np.argmax(model_out) == 1: str_label='Dog'
else: str_label='Cat'

y.imshow(orig,cmap='gray')
plt.title(str_label)
y.axes.get_xaxis().set_visible(False)
y.axes.get_yaxis().set_visible(False)

plt.show()

hardmaru commented 5 years ago

Hi,

Not sure I understand

What does the world models paper have to do with classifying dogs and cats?

Also where did you get 227x227x3 dimensions from? To my knowledge, this m has nothing to do with the paper.

On Sat, Jan 12, 2019 at 5:48 PM Flamer17 notifications@github.com wrote:

import matplotlib.pyplot as plt

test_data = process_test_data() test_data = np.load('test_data.npy')

fig=plt.figure()

for num,data in enumerate(test_data[:12]):

img_num = data[1] img_data = data[0].reshape(-1,IMG_SIZE,IMG_SIZE,3)

y = fig.add_subplot(3,4,num+1) orig = img_data data = img_data model_out = model.predict([data])[0]

if np.argmax(model_out) == 1: str_label='Dog' else: str_label='Cat'

y.imshow(orig,cmap='gray') plt.title(str_label) y.axes.get_xaxis().set_visible(False) y.axes.get_yaxis().set_visible(False)

plt.show()

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hardmaru/WorldModelsExperiments/issues/15, or mute the thread https://github.com/notifications/unsubscribe-auth/AGBoHthxmmy5jokaynU4wxw5UfQb3G6Lks5vCaF7gaJpZM4Z8jy2 .

Chazzz commented 5 years ago

Flamer seems to be referencing code completely unrelated to the repo. I think this is safe to ignore.

Code is here: https://gist.github.com/NgachaIan/28a86d9a78af1afdc344b373bd19e568