Exemple #1
0
 def _double_feature(value):
     """Wrapper for inserting float features into Example proto."""
     if not isinstance(value, list):
         value = [value]
     return of_record.Feature(double_list=of_record.DoubleList(value=value))
Exemple #2
0
def double_feature(value):
    if not isinstance(value, (list, tuple)):
        value = [value]
    return ofrecord.Feature(double_list=ofrecord.DoubleList(value=value))