Closed tuttlebr closed 2 years ago
You should check your last layer of the network
For example: logits = tf.layers.dense(x, units=NUM_CLASSES, activation=None, kernel_initializer=kernel_initializer
I also had this error when the output of the last softmax layer does not match the number of classes
Hello,
Can someone please share how to pass a tf.data API to the input_fn if the adanet estimator? I am using the customizing_adanet.ipynb as a starting point. I have the function below which accepts file paths as string and labels as integers. The load_and_preprocess_from_path_label function map function will take these strings of file paths and return {"images":image tensor}, labels.
The error i receive, when running the example, is below: ValueError: logits shape must be [D0, D1, ... DN, logits_dimension], got (?, 10).