2015-10-07 152 views
0

我想訓練前饋神經網絡,進行二元分類。我的數據集是6.2M,尺寸爲1.5M。我正在使用PyBrain。我無法加載一個數據點。我得到MemoryError。 MemoryErrorPyBrain:MemoryError:加載訓練數據集

我的代碼片段是:

Train_ds = SupervisedDataSet(FV_length, 1) #FV_length is a computed value. 150000 
feature_vector = numpy.zeros((FV_length),dtype=numpy.int) 
#activate feature values 
for index in nonzero_index_list: 
     feature_vector[index] = 1 

Train_ds.addSample(feature_vector,class_label) # both the arguments are tuples 

回答

1

它看起來像你的電腦只是沒有到你的特點,類別標籤陣列添加到監測數據集Train_ds內存。

如果您無法爲您的系統分配更多內存,那麼從數據集中隨機抽取樣本並在較小樣本上進行訓練可能是一個好主意。

這應該仍然給出準確的結果,假設樣本足夠大以致具有代表性。

相關問題