Giter VIP home page Giter VIP logo

Comments (1)

yangsiran avatar yangsiran commented on May 18, 2024

@wwb306 目前的run loop训练的顶点都是从图里面按顶点权重采样得到的(train_node_type),id_file仅仅是用来指定测试集的。

您可以替换一下这段代码,让样本顶点从文件中读取。事实上,被注释的代码正好做了这一点。

if flags_obj.model == 'line' or flags_obj.model == 'randomwalk':
source = euler_ops.sample_node(
count=batch_size, node_type=flags_obj.all_node_type)
else:
source = euler_ops.sample_node(
count=batch_size, node_type=flags_obj.train_node_type)
source.set_shape([batch_size])
# dataset = tf.data.TextLineDataset(flags_obj.id_file)
# dataset = dataset.map(
# lambda id_str: tf.string_to_number(id_str, out_type=tf.int64))
# dataset = dataset.shuffle(buffer_size=20000)
# dataset = dataset.batch(batch_size)
# dataset = dataset.repeat(flags_obj.num_epochs)
# source = dataset.make_one_shot_iterator().get_next()
_, loss, metric_name, metric = model(source)

from euler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.