def _GenerateProjectorTestData(self):
    config_path = os.path.join(self.log_dir, 'projector_config.pbtxt')
    config = ProjectorConfig()
    embedding = config.embeddings.add()
    embedding.tensor_name = 'var1:0'
    config_pbtxt = text_format.MessageToString(config)
    with gfile.GFile(config_path, 'w') as f:
        f.write(config_pbtxt)
    with ops.Graph().as_default():
        sess = session.Session()
        checkpoint_path = os.path.join(self.log_dir, 'model')
        variable_scope.get_variable('var1', [1, 2], initializer=init_ops.constant_initializer(6.0))
        variable_scope.get_variable('var2', [10, 10])
        variable_scope.get_variable('var3', [100, 100])
        sess.run(variables.global_variables_initializer())
        saver = saver_lib.Saver(write_version=saver_pb2.SaverDef.V1)
        saver.save(sess, checkpoint_path)
def _GenerateProjectorTestData(self):
    config_path = os.path.join(self.log_dir, 'projector_config.pbtxt')
    config = ProjectorConfig()
    embedding = config.embeddings.add()
    embedding.tensor_name = 'var1:0'
    config_pbtxt = text_format.MessageToString(config)
    with gfile.GFile(config_path, 'w') as f:
        f.write(config_pbtxt)
    with ops.Graph().as_default():
        sess = session.Session()
        checkpoint_path = os.path.join(self.log_dir, 'model')
        variable_scope.get_variable('var1', [1, 2], initializer=init_ops.constant_initializer(6.0))
        variable_scope.get_variable('var2', [10, 10])
        variable_scope.get_variable('var3', [100, 100])
        sess.run(variables.global_variables_initializer())
        saver = saver_lib.Saver(write_version=saver_pb2.SaverDef.V1)
        saver.save(sess, checkpoint_path)