FIFO队列 - tf.string形状

时间:2016-12-08 10:55:51

标签: tensorflow

我有一个FIFO队列,它采用(图像,标签和字符串)元组,如下所示;

imageQ = tf.FIFOQueue(128,[tf.uint8,tf.float32,tf.string])

我想要批量出现多个,即批量生产但需要指定形状,但我不确定要为字符串对象指定什么形状。例如;

imageQ = tf.FIFOQueue(128,[tf.uint8,tf.float32,tf.string], shapes = [[600,800,3],[1],[?]])

如何将字符串张量整形到队列中?

1 个答案:

答案 0 :(得分:1)

刚刚意识到我只需要重塑字符串;

//default states
$scope.selectDays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
$scope.selectedList = {};

/**
 * Action
 */
$scope.submit = function () {
    angular.forEach($scope.selectedList, function (selected, day) {
        if (selected) {
           console.log(day);
        }
    });
};