기계는 거짓말하지 않는다

TensorFlow keras model fit UnimplementedError: Graph execution error 본문

AI

TensorFlow keras model fit UnimplementedError: Graph execution error

KillinTime 2023. 5. 5. 21:57

Tensorflow 2.10 GPU 버전을 사용하였다.

keras 모델 fit 함수에서 오류가 발생했다.

아래는 오류 내용이다.

 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.UnimplementedError: Graph execution error:
...
Deterministic GPU implementation of unsorted segment reduction op not available.
         [[{{node gradient_tape/sparse_categorical_crossentropy/SparseSoftmaxCrossEntropyWithLogits/UnsortedSegmentSum}}]] [Op:__inference_train_function_1210]

segment reduction 연산은 TensorFlow에서 분산 학습을 수행할 때 사용되는 연산 중 하나라고 한다.

이 경우 예외가 발생할 수 있는데 이를 비활성화할 수 있다.

os.environ['TF_DISABLE_SEGMENT_REDUCTION_OP_DETERMINISM_EXCEPTIONS'] = '1'
Comments