Tensorflow Invalid Argument: Assertation Failed [Label IDs must < n_classes]
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get an error implementing a DNNClassifier in Tensorflow 1.3.0 with Python 2.7. I got the sample code from the Tensorflow tf.estimator Quickstart Tutorial and I want to run it with my own dataset: 3D coordinates and 10 different classes (int labels). Here is my implementation: #!/usr/bin/env python # -*- coding: utf-8 -*- def ReadLabels(file): #load the labels from test file here labelFile = open(file, "r") Label = labelFile.readlines(); returnL = [[Label[i][j+1] for j in range(len(Label[0])-3)] for i in range(len(Label))] returnLint = list