2016-12-15 1 views
0

난 그냥 tensorflow 0.12에서 다음과 같은 경고 제거하기 위해 tf.contrib.learn tutorial의 코드를 리팩토링 선호하는 방법 무엇이 궁금 :tf.contrib.learn 튜토리얼 중단 경고

Estimator is decoupled from Scikit Learn interface by moving into 
separate class SKCompat. Arguments x, y and batch_size are only 
available in the SKCompat class, Estimator will only accept input_fn. 
Example conversion: 
est = Estimator(...) -> est = SKCompat(Estimator(...)) 

상기 상대를 코드, DNNClassifier 사용자 정의 견적을 할 수 없으며, 적합 방법은 적합 메서드에 전달되지 않은 경우에도 X, Y 및 BATCH_SIZE 경우, 경고를 트리거

self._estimator.fit(x=x, 
        y=y, 
        input_fn=input_fn, 
        steps=steps, 
        batch_size=batch_size, 
        monitors=hooks, 
        max_steps=max_steps) 

를 호출합니다.

답변

0

Tensorflow 1.0 (곧 공개 예정)에서 tf.learn (tf.contrib.learn)으로 주 배포로 이동한다고 들었습니다. 시도 해보고 싶다면 그렇게 할 수 있습니다.

+0

에 설명 된대로 input_fn()을 사용할 수 있습니다. 공식 지원되는 고수준 라이브러리가 있기를 바랍니다. – ComputerScientist

1

SKCompat의 경우 모두 으로 "바꿀"수 있습니다. 필자는 직유 문제가 있으며 부분적으로는 (예) tf.contrib.learn.SKCompat(tf.contrib.learn.DNNClassifier(...).fit(...)으로 해결했습니다. tensorflow.org

관련 문제