-
구글 코랩 colab 에러, OOM when allocating tensor with shape[128,32007,512] and type float on /job:.....AI Python/Python 2021. 10. 22. 22:36
구글 코랩 사용시 문제가 없는 코드를 실행해도 에러가 발생할때가 있습니다.
Summary
colab free mode - error
colab 9.99$ mode - ok
shape의 데이터가 너무크면 발생하는 에러입니다.
구글 코랩 free 버전에서는 에러가 발생합니다.
해결 방법은 좀 당황하긴 했습니다. 구글 colab 유료 구독 9.99$ 달러를 사용 하시면 해결 됩니다.
다른 방법은 shape[128,32007,512] 을 조정해서 사용하시면 됩니다.유료 구독 방법
https://colab.research.google.com/signup
에러메시지 전체내용은 아래와 같습니다.
-----------------------
ResourceExhaustedError: OOM when allocating tensor with shape[128,32007,512] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[node gradient_tape/t5_multi_task/weight_shared_embedding/MatMul/MatMul_1 (defined at <ipython-input-122-7a7580546407>:5) ]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info. This isn't available when running in Eager mode.
[Op:__inference_train_function_118452]
Errors may have originated from an input operation.
Input Source operations connected to node gradient_tape/t5_multi_task/weight_shared_embedding/MatMul/MatMul_1:
t5_multi_task/t5/decoder_layer_5/t5_layer_norm_179/mul_1 (defined at <ipython-input-17-ebe6bf3af4e0>:17)
Function call stack:
train_function
---------------------------------colab free
colab 9.99달러 결재후
유료 결재 모드는 2개가 있습니다.