全文搜索
标题搜索
全部时间
1小时内
1天内
1周内
1个月内
默认排序
按时间排序
为您找到相关结果95,826个

GCN 图神经网络使用详解 可视化 Pytorch_python_脚本之家

# Gather some statistics about the graph. print(f'Number of nodes: {data.num_nodes}') print(f'Number of edges: {data.num_edges}') print(f'Average node degree: {data.num_edges / data.num_nodes:.2f}') print(f'Number of training nodes: {data.train_mask.sum()}') print(f'Training...
www.jb51.net/article/2702...htm 2025-3-13

java编程无向图结构的存储及DFS操作代码详解_java_脚本之家

theGraph.addEdge(2, 4); //CE System.out.print("The order visited:"); theGraph.dfs(); System.out.println(); } } }程序运行的结果: 1 The order visited:ABCED 总结以上就是本文关于java编程无向图结构的存储及DFS操作代码详解的全部内容,希望对大家有所帮助。感兴趣的朋友可以继续参阅本站:Java...
www.jb51.net/article/1300...htm 2025-3-5

tensorflow estimator 使用hook实现finetune方式_python_脚本之家

# ops can no longer be added to the graph. print('Session created.') tf.logging.info('Fine-tuning from %s' % self.checkpoint_path) self.saver.restore(session, os.path.expanduser(self.checkpoint_path)) tf.logging.info('End fineturn from %s' % self.checkpoint_path) def before_run(self...
www.jb51.net/article/1789...htm 2025-3-4

PyTorch训练LSTM时loss.backward()报错的解决方案_python_脚本之家

RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time. 千万别改成loss.backward(retain_graph=True),会导致显卡内存随着训练一直增加直到OOM: ...
www.jb51.net/article/2137...htm 2025-3-16

使用D3.js构建实时图形的示例代码_javascript技巧_脚本之家

// Select all bars on the graph, take them out, and exit the previous data set. // Enter the new data and append the rectangles for each object in the poll array svg .selectAll('.bar') .remove() .exit() .data(poll) .enter() .append('rect') .attr('class', 'bar') .attr(...
www.jb51.net/article/1463...htm 2025-2-26

Pytorch中的backward()多个loss函数用法_python_脚本之家

graph leaves.The graph is differentiated using the chain rule. If any of tensors are non-scalar (i.e. their data has more than one element) and require gradient, the function additionally requires specifying grad_tensors. It should be a sequence of matching length, that contains gradient of...
www.jb51.net/article/2131...htm 2025-3-4

R语言绘图基础教程(新手入门推荐!)_R语言_脚本之家

# produce the graph barplot(counts, main="Treatment Outcome", horiz=TRUE, cex.names=0.8, names.arg=c("No Improvement", "Some Improvement", "Marked Improvement") ) par(opar) 2、棘状图 是一种特殊的条形图,它称为棘状图(spinogram)。棘状图对堆砌条形图进行了重缩放,这样每个条形的高度均为...
www.jb51.net/article/2666...htm 2025-3-14

pytorch中retain_graph==True的作用说明_python_脚本之家

总的来说进行一次backward之后,各个节点的值会清除,这样进行第二次backward会报错,如果加上retain_graph==True后,可以再来一次backward。 retain_graph参数的作用 官方定义: retain_graph (bool, optional) – If False, the graph used to compute the grad will be freed. Note that in nearly all cases settin...
www.jb51.net/article/2759...htm 2025-3-17

TensorFlow深度学习另一种程序风格实现卷积神经网络_python_脚本之家

# LAUNCH THE GRAPH sess = tf.Session() # 定义一个Session sess.run(init) #在sess里run一下初始化操作 # OPTIMIZE for epoch in range(training_epochs): avg_cost = 0. total_batch = int(mnist.train.num_examples/batch_size) for i in range(total_batch): batch_xs, batch_ys = mnist.train...
www.jb51.net/article/2272...htm 2025-3-9

python使用Plotly绘图工具绘制柱状图_python_脚本之家

title ='The Graph Title', xaxis = go.XAxis(range = [-0.5,4.5], domain = [0,1]) ) # Figure figure_basic = go.Figure(data = trace_basic, layout = layout_basic) # Plot pyplt(figure_basic, filename='tmp/1.html') 上面这个例子,就是一个简单的柱状图。
www.jb51.net/article/1588...htm 2025-3-15