python - tensorflow input pipeline returns multiple values -


i'm trying make input pipeline in tensorflow image classification, therefore want make batches of images , corresponding labels. tensorflow document suggests can use tf.train.batch make batches of inputs:

train_batch, train_label_batch = tf.train.batch( [train_image, train_image_label], batch_size=batch_size, num_threads=1, capacity=10*batch_size, enqueue_many=false, shapes=[[224,224,3], [len(labels),]], allow_smaller_final_batch=true ) 

however, i'm thinking problem if feed in graph this:

cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(labels=train_label_batch, logits=model(train_batch))) 

the question operation in cost function dequeues images , corresponding labels, or returns them separately? therefore causing training wrong images , labels.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -