parameters: (bottleneck_path, image_lists, label_name, index,
                             image_dir, category, sess, jpeg_data_tensor,
                             decoded_image_tensor, resized_input_tensor,
                             bottleneck_tensor)
docstring: Create a single bottleneck file.
docstring_summary: Create a single bottleneck file.
docstring_tokens: Create a single bottleneck file .
function: def create_bottleneck_file(bottleneck_path, image_lists, label_name, index,
                             image_dir, category, sess, jpeg_data_tensor,
                             decoded_image_tensor, resized_input_tensor,
                             bottleneck_tensor):
    """Create a single bottleneck file."""
    tf.logging.info('Creating bottleneck at ' + bottleneck_path)
    image_path = get_image_path(image_lists, label_name, index,
                                image_dir, category)
    if not gfile.Exists(image_path):
      tf.logging.fatal('File does not exist %s', image_path)
    image_data = gfile.FastGFile(image_path, 'rb').read()
    try:
      bottleneck_values = run_bottleneck_on_image(
          sess, image_data, jpeg_data_tensor, decoded_image_tensor,
          resized_input_tensor, bottleneck_tensor)
    except Exception as e:
      raise RuntimeError('Error during processing file %s (%s)' % (image_path,
                                                                   str(e)))
    bottleneck_string = ','.join(str(x) for x in bottleneck_values)
    with open(bottleneck_path, 'w') as bottleneck_file:
      bottleneck_file.write(bottleneck_string)
function_tokens: def create_bottleneck_file ( bottleneck_path , image_lists , label_name , index , image_dir , category , sess , jpeg_data_tensor , decoded_image_tensor , resized_input_tensor , bottleneck_tensor ) : tf . logging . info ( 'Creating bottleneck at ' + bottleneck_path ) image_path = get_image_path ( image_lists , label_name , index , image_dir , category ) if not gfile . Exists ( image_path ) : tf . logging . fatal ( 'File does not exist %s' , image_path ) image_data = gfile . FastGFile ( image_path , 'rb' ) . read ( ) try : bottleneck_values = run_bottleneck_on_image ( sess , image_data , jpeg_data_tensor , decoded_image_tensor , resized_input_tensor , bottleneck_tensor ) except Exception as e : raise RuntimeError ( 'Error during processing file %s (%s)' % ( image_path , str ( e ) ) ) bottleneck_string = ',' . join ( str ( x ) for x in bottleneck_values ) with open ( bottleneck_path , 'w' ) as bottleneck_file : bottleneck_file . write ( bottleneck_string )