错误:TypeError: ('Bad input argument to theano function with name
"c2.py:77" at index 1(0-based)', 'Wrong number of dimensions:
expected 2, got 1 with shape (128L,).')
请告知如何修理?在
代码和数据可通过以下链接下载:
http://u.163.com/axfWJ81e
然后输入这个代码:QU90WxTZ
我的密码是:# -*- coding: utf-8 -*-
import os
import pandas as pd
import theano
from theano import tensor as T
import numpy as np
def normalizeX(X):
return X / 255.0
data = pd.read_csv("digits3a.csv")
trX = normalizeX(data.values[:, 1:].astype(float))
trY = data.values[:, 0]
data = pd.read_csv("digits3b.csv")
teX = normalizeX(data.values.astype(float))
def floatX(X):
return np.asarray(X, dtype=theano.config.floatX)
def init_weights(sh