Integrate sayanpa/playgithub-master into master

This commit is contained in:
Project Philly 2017-06-16 06:07:19 -07:00
Родитель 4d09c6119e e56e6e25f7
Коммит 002a553216
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -23,4 +23,4 @@ def test_cntk_106A_lstm_timeseries_with_simulated_data_evalCorrect(nb, device_id
if cell.cell_type == 'code' and re.search('# Print validate and test error', cell.source)]
assert len(testCell) == 1
m = re.match(r"mse for test: (?P<actualEvalError>\d+\.\d+)\r?$", testCell[0].outputs[0]['text'])
assert np.isclose(float(m.group('actualEvalError')), expectedEvalErrorByDeviceId[device_id], atol=0.000001)
assert np.isclose(float(m.group('actualEvalError')), expectedEvalErrorByDeviceId[device_id], atol=0.000004)

Просмотреть файл

@ -192,7 +192,7 @@
" data = pd.DataFrame(dict(a = data[0:len(data) - time_shift],\n",
" b = data[time_shift:]))\n",
" rnn_x = []\n",
" for i in range(len(data) - time_steps):\n",
" for i in range(len(data) - time_steps + 1):\n",
" rnn_x.append(data['a'].iloc[i: i + time_steps].as_matrix())\n",
" rnn_x = np.array(rnn_x)\n",
"\n",
@ -202,6 +202,7 @@
" rnn_x = rnn_x.reshape(rnn_x.shape + (1,))\n",
" \n",
" rnn_y = data['b'].values\n",
" rnn_y = rnn_y[time_steps - 1 :]\n",
" \n",
" # Reshape or rearrange the data from row to columns\n",
" # to match the input shape\n",