pipelines.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:polyaxon 作者: polyaxon 项目源码 文件源码
def _create_sequence_features(self):
        sequences = {}
        for feature, feature_type in self.meta_data['sequence_features_types'].items():
            if feature_type == 'int':
                sequences[feature] = tf.FixedLenSequenceFeature([], dtype=tf.int64)
            elif feature_type == 'float':
                sequences[feature] = tf.FixedLenSequenceFeature([], dtype=tf.float32)
            elif feature_type == 'bytes':
                sequences[feature] = tf.FixedLenSequenceFeature([], dtype=tf.string)
            else:
                raise TypeError("The feature type `{}` is not supported.".format({feature_type}))

        return sequences
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号