Я обучаю автоэнкодер тензорному потоку (альфа-версия 2.0), и мне не хватает памяти (из 10% выделенной памяти), даже если я установил размер пакета равным 2.
Я использую следующий код:
with tf.compat.v1.Session() as sess:
sess.run(tf.compat.v1.global_variables_initializer())
for epoch_i in range(epochs):
for batch_i in range(number_of_batches_train):
batch_data_train = getBatch(aug_data_train, batch_i, batch_size)
sess.run(optimizer, feed_dict={x1: batch_data_train[:,:,0], X: batch_data_train}) #complex warning
#Here is where the problem is
loss_train = sess.run(loss, feed_dict={x1: aug_data_train[:,:,0], X: aug_data_train})
loss_validate = sess.run(loss,feed_dict={x1: aug_data_validate[:,:,0], X: aug_data_validate})
print(epoch_i, loss_train)
И получаю следующую ошибку:
2019-06-11 03:58:14.883251: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-06-11 03:58:14.915905: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2899835000 Hz
2019-06-11 03:58:14.916053: I tensorflow/compiler/xla/service/service.cc:162] XLA service 0x5e656f0 executing computations on platform Host. Devices:
2019-06-11 03:58:14.916073: I tensorflow/compiler/xla/service/service.cc:169] StreamExecutor device (0): <undefined>, <undefined>
Epoch Loss
/cluster/home/tmarta/.local/lib/python3.6/site-packages/numpy/core/numeric.py:538: ComplexWarning: Casting complex values to real discards the imaginary part
return array(a, dtype, copy=False, order=order)
2019-06-11 03:59:02.987351: W tensorflow/core/framework/allocator.cc:116] Allocation of 1910988800 exceeds 10% of system memory.
Killed
У кого-нибудь есть идеи, как решить эту проблему? Я прочитал много вопросов, связанных с этой темой, но ни один из них не решил мою проблему ... Спасибо!