본문 바로가기
Error Note

[Tensorflow] Invalid argument: Subshape must have computed start >= end since stride is negative,,,

by ga.0_0.ga 2023. 1. 29.
728x90
반응형
반응형

- 전체 에러 문구

Subshape must have computed start >= end since stride is negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)

(확실하지는 않지만) ​Tensorflow에서 custom loss를 사용할 때 발생하는 오류로 생각됩니다.

- 해결 방법

from tensorflow.python.framework.ops import disable_eager_execution
disable_eager_execution()

위 코드를 추가하면 해결 가능합니다.

 
728x90
반응형

댓글