利用 tf.gradients 在 TensorFlow 中实现梯度下降

Tensorflow中k.gradients()和tf.stop_gradient()用法说明 上周在实验室开荒某个代码,看到中间这么一段,对Tensorflow中的stop_gradient()还不熟悉,特此周末进行重新并总结。 y = xx + K.stop_gradient(rounded – xx) 这代码最终调用位置在tensoflow.python.ops.gen_array_ops.stop_gradient(input, name=None),关于这段代码为什么这样写的意义在文末给出。 【stop_gradient()意义】 用stop_gradient生成损失函数w.r.t.的梯度。 【tf.gradients()理解】 tf中我们只需要设计我们自己的函数,tf提供 立即下载

作者:chen_h
微信号 & QQ:862251340
微信公众号:coderpai
简书地址:http://www.jianshu.com/p/13e024c8ea44


我喜欢 TensorFlow 的其中一个原因是它可以自动的计算函数的梯度。我们只需要设计我们的函数,然后去调用 tf.gradients 函数就可以了。是不是非常简单。

接下来让我们来举个例子,具体说明一下。

使用 TensorFlow 内置的优化器对 MNIST 数据集进行 softmax 回归

在使用 tf.gradients 实现梯度下降之前,我们先尝试使用 TensorFlow 的内置优化器(比如 GradientDescentOptimizer)来解决MNIST数据集分类问题。

import tensorflow as tf

# Import MNIST data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)

# Parameters
learning_rate = 0.01
training_epochs = 10
batch_size = 100
display_step = 1


# tf Graph Input
x = tf.placeholder(tf.float32, [None, 784]) # mnist data image of shape 28*28=784
y = tf.placeholder(tf.float32, [None, 10]) # 0-9 digits recognition => 10 classes

# Set model weights
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))

# Construct model
pred = tf.nn.softmax(tf.matmul(x, W) + b) # Softmax

# Minimize error using cross entropy
cost = tf.reduce_mean(-tf.reduce_sum(y*tf.log(pred), reduction_indices=1))

optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost)

# Start training
with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())

    # Training cycle
    for epoch in range(training_epochs):
        avg_cost = 0.
        total_batch = int(mnist.train.num_examples/batch_size)
        # Loop over all batches
        for i in range(total_batch):
            batch_xs, batch_ys = mnist.train.next_batch(batch_size)
            # Fit training using batch data
            _, c = sess.run([optimizer, cost], feed_dict={x: batch_xs,
                                                       y: batch_ys})

#             print(__w)

            # Compute average loss
            avg_cost += c / total_batch
        # Display logs per epoch step
        if (epoch+1) % display_step == 0:
#             print(sess.run(W))
            print ("Epoch:", '%04d' % (epoch+1), "cost=", "{:.9f}".format(avg_cost))

    print ("Optimization Finished!")

    # Test model
    correct_prediction = tf.equal(tf.argmax(pred, 1), tf.argmax(y, 1))
    # Calculate accuracy for 3000 examples
    accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
    print ("Accuracy:", accuracy.eval({x: mnist.test.images[:3000], y: mnist.test.labels[:3000]}))


#### Output

# Extracting /tmp/data/train-images-idx3-ubyte.gz
# Extracting /tmp/data/train-labels-idx1-ubyte.gz
# Extracting /tmp/data/t10k-images-idx3-ubyte.gz
# Extracting /tmp/data/t10k-labels-idx1-ubyte.gz
# Epoch: 0001 cost= 1.184285608
# Epoch: 0002 cost= 0.665428013
# Epoch: 0003 cost= 0.552858426
# Epoch: 0004 cost= 0.498728328
# Epoch: 0005 cost= 0.465593693
# Epoch: 0006 cost= 0.442609185
# Epoch: 0007 cost= 0.425552949
# Epoch: 0008 cost= 0.412188290
# Epoch: 0009 cost= 0.401390140
# Epoch: 0010 cost= 0.392354651
# Optimization Finished!
# Accuracy: 0.873333

所以,我们在这里做的是利用内置的优化器来计算损失值。如果我们想自己计算渐变过程和更新权重,那应该怎么办?这就是 tf.gradients 的作用了。

使用 tf.gradients 对MNIST数据集进行 softmax 回归

通过梯度下降公式,权重的更新方式如下:

为了实现梯度下降,我将不使用优化器的代码,而是采用自己写的权重更新。

因为这里有权重矩阵 w 和偏差项矩阵 b,所以我们需要去计算这些矩阵的梯度。所以实现的代码如下:

# Computing the gradient of cost with respect to W and b
grad_W, grad_b = tf.gradients(xs=[W, b], ys=cost)

# Gradient Step
new_W = W.assign(W - learning_rate * grad_W)
new_b = b.assign(b - learning_rate * grad_b)

这三行代码只是替代前面的一行代码,干嘛给自己造成这么大的麻烦呢?因为如果你需要自己的损失函数的梯度,并且你不想编写严格的数学函数,那么 TensorFlow 就可以帮助你了。

我们已经构建好了计算图,所以接下来我们只需要在会话中运行这个计算图就行了。让我来试试吧。

# Fit training using batch data
            _, _,  c = sess.run([new_W, new_b ,cost], feed_dict={x: batch_xs, y: batch_ys})

我们不需要 new_W 和 new_b 的输出,所以我忽略了这些变量。

完整代码如下:

import tensorflow as tf

# Import MNIST data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)

# Parameters
learning_rate = 0.01
training_epochs = 10
batch_size = 100
display_step = 1

# Parameters
learning_rate = 0.01
training_epochs = 10
batch_size = 100
display_step = 1

# tf Graph Input
x = tf.placeholder(tf.float32, [None, 784]) # mnist data image of shape 28*28=784
y = tf.placeholder(tf.float32, [None, 10]) # 0-9 digits recognition => 10 classes

# Set model weights
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))

# Construct model
pred = tf.nn.softmax(tf.matmul(x, W) + b) # Softmax

# Minimize error using cross entropy
cost = tf.reduce_mean(-tf.reduce_sum(y*tf.log(pred), reduction_indices=1))

grad_W, grad_b = tf.gradients(xs=[W, b], ys=cost)


new_W = W.assign(W - learning_rate * grad_W)
new_b = b.assign(b - learning_rate * grad_b)

# Initialize the variables (i.e. assign their default value)
init = tf.global_variables_initializer()

# Start training
with tf.Session() as sess:
    sess.run(init)

    # Training cycle
    for epoch in range(training_epochs):
        avg_cost = 0.
        total_batch = int(mnist.train.num_examples/batch_size)
        # Loop over all batches
        for i in range(total_batch):
            batch_xs, batch_ys = mnist.train.next_batch(batch_size)
            # Fit training using batch data
            _, _,  c = sess.run([new_W, new_b ,cost], feed_dict={x: batch_xs,
                                                       y: batch_ys})

            # Compute average loss
            avg_cost += c / total_batch
        # Display logs per epoch step
        if (epoch+1) % display_step == 0:
#             print(sess.run(W))
            print ("Epoch:", '%04d' % (epoch+1), "cost=", "{:.9f}".format(avg_cost))

    print ("Optimization Finished!")

    # Test model
    correct_prediction = tf.equal(tf.argmax(pred, 1), tf.argmax(y, 1))
    # Calculate accuracy for 3000 examples
    accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
    print ("Accuracy:", accuracy.eval({x: mnist.test.images[:3000], y: mnist.test.labels[:3000]}))


# Output
# Epoch: 0001 cost= 1.183741399
# Epoch: 0002 cost= 0.665312284
# Epoch: 0003 cost= 0.552796521
# Epoch: 0004 cost= 0.498697014
# Epoch: 0005 cost= 0.465521633
# Epoch: 0006 cost= 0.442611256
# Epoch: 0007 cost= 0.425528946
# Epoch: 0008 cost= 0.412203073
# Epoch: 0009 cost= 0.401364554
# Epoch: 0010 cost= 0.392398663
# Optimization Finished!
# Accuracy: 0.874

使用梯度公式的 softmax 回归

我们对于权重 w 的梯度处理如下:

如前所示,不使用 tf.gradients 或使用 TensorFlow 的内置优化器,这样可以实现梯度方程。完整代码如下:

import tensorflow as tf

# Import MNIST data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)

# Parameters
learning_rate = 0.01
training_epochs = 10
batch_size = 100
display_step = 1

# Parameters
learning_rate = 0.01
training_epochs = 10
batch_size = 100
display_step = 1

# tf Graph Input
x = tf.placeholder(tf.float32, [None, 784]) # mnist data image of shape 28*28=784
y = tf.placeholder(tf.float32, [None, 10]) # 0-9 digits recognition => 10 classes

# Set model weights
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))

# Construct model
pred = tf.nn.softmax(tf.matmul(x, W)) # Softmax

# Minimize error using cross entropy
cost = tf.reduce_mean(-tf.reduce_sum(y*tf.log(pred), reduction_indices=1))


W_grad =  - tf.matmul ( tf.transpose(x) , y - pred) 
b_grad = - tf.reduce_mean( tf.matmul(tf.transpose(x), y - pred), reduction_indices=0)

new_W = W.assign(W - learning_rate * W_grad)
new_b = b.assign(b - learning_rate * b_grad)

init = tf.global_variables_initializer()


with tf.Session() as sess:
    sess.run(init)

    # Training cycle
    for epoch in range(training_epochs):
        avg_cost = 0.
        total_batch = int(mnist.train.num_examples/batch_size)
        # Loop over all batches
        for i in range(total_batch):
            batch_xs, batch_ys = mnist.train.next_batch(batch_size)
            # Fit training using batch data
            _, _, c = sess.run([new_W, new_b, cost], feed_dict={x: batch_xs, y: batch_ys})


            # Compute average loss
            avg_cost += c / total_batch
        # Display logs per epoch step
        if (epoch+1) % display_step == 0:
            print ("Epoch:", '%04d' % (epoch+1), "cost=", "{:.9f}".format(avg_cost))

    print ("Optimization Finished!")

    # Test model
    correct_prediction = tf.equal(tf.argmax(pred, 1), tf.argmax(y, 1))
    # Calculate accuracy for 3000 examples
    accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
    print ("Accuracy:", accuracy.eval({x: mnist.test.images[:3000], y: mnist.test.labels[:3000]}))


# Output
# Extracting /tmp/data/train-images-idx3-ubyte.gz
# Extracting /tmp/data/train-labels-idx1-ubyte.gz
# Extracting /tmp/data/t10k-images-idx3-ubyte.gz
# Extracting /tmp/data/t10k-labels-idx1-ubyte.gz
# Epoch: 0001 cost= 0.432943137
# Epoch: 0002 cost= 0.330031527
# Epoch: 0003 cost= 0.313661941
# Epoch: 0004 cost= 0.306443773
# Epoch: 0005 cost= 0.300219418
# Epoch: 0006 cost= 0.298976618
# Epoch: 0007 cost= 0.293222957
# Epoch: 0008 cost= 0.291407861
# Epoch: 0009 cost= 0.288372261
# Epoch: 0010 cost= 0.286749691
# Optimization Finished!
# Accuracy: 0.898

Tensorflow 是如何计算梯度的?

你可以在思考,TensorFlow是如何计算函数的梯度?

TensorFlow 使用的是一种称为 Automatic Differentiation 的方法,具体你可以查看 Wikipedia。

我希望这篇文章对你有帮会帮助。


算法直播课:请点击这里

作者:chen_h
微信号 & QQ:862251340
简书地址:http://www.jianshu.com/p/13e024c8ea44

CoderPai 是一个专注于算法实战的平台,从基础的算法到人工智能算法都有设计。如果你对算法实战感兴趣,请快快关注我们吧。加入AI实战微信群,AI实战QQ群,ACM算法微信群,ACM算法QQ群。长按或者扫描如下二维码,关注 “CoderPai” 微信号(coderpai)

这里写图片描述

这里写图片描述

TensorFlow梯度求解tf.gradients实例 今天小编就为大家分享一篇TensorFlow梯度求解tf.gradients实例,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧 立即下载

相关推荐

kaggle注册以及数据集下载全流程

kaggle注册,数据集下载及常见问题

Arriteey的博客 2万+

tensorflow—tf.gradients()简单实用教程

声明: 参考官方文档 参考tensorflow学习笔记(三十) 关于神经网络中的梯度计算,推荐吴恩达的deeplearning公开课 tf.gradients() 在tensorflow中,tf.gradients()的参数如下: tf.gradients(ys, xs, grad_ys=None, name='gradients...

hustqb的博客 6万+

LSM6DSOW陀螺仪轮询驱动:从I2C/SPI配置到数据读取全解析

惯性测量单元(IMU)是现代嵌入式系统中实现姿态感知与运动跟踪的核心传感器,其通过加速度计和陀螺仪测量线性加速度与角速度。在嵌入式开发中,轮询(Polling)作为一种基础且可靠的通信方式,通过主循环主动查询传感器状态,简化了初始调试与验证流程。对于I2C/SPI接口的数字传感器,掌握寄存器配置、数据就绪标志检查及原始数据转换是通用的驱动方法,能够快速验证传感器工作状态并理解数据流。LSM6DSOW作为一款高性能6轴IMU,支持可配置的量程与输出数据速率,适用于无人机飞控、手持云台等高动态场景。本文以LSM

weixin_28728265的博客 555

Tensorflow tf.gradients 详解

tf.gradients gradients( ys, xs, grad_ys=None, name=‘gradients’, colocate_gradients_with_ops=False, gate_gradients=False, aggregation_method=None ) 在 xs 中构造了 ys 的 w.r.t. x 和的符号偏导数. ys 和 xs 是一个张量或一个张量的列...

ip5108的博客 5280

Pikachu靶场环境搭建(Windows环境下安装详细教程)

Pikachu靶场是一个漏洞测试练习平台。其中包含了常见的web安全漏洞,如果你是一个渗透测试学习者没有靶场的练手,那么pikachu是一个很好的测试平台。

weixin_42857656的博客 1823

视觉Transformer实战 | Data-efficient image Transformer(DeiT)详解与实现

在计算机视觉领域,Vision Transformer (ViT) 已经证明了纯 Transformer 架构在图像分类任务上的强大能力。然而,ViT 通常需要在大规模数据集上预训练才能达到最佳性能,DeiT (Data-efficient image Transformer) 通过引入一系列训练策略和优化,使得 Transformer 模型能够在相对较小的数据集上取得优异表现。本节将详细介绍 DeiT 的技术原理,并使用 PyTorch 从零开始实现 DeiT 模型。

盼小辉丶的博客 1341

tensorflow中tf.gradients()解析

tf.gradients()解析及grad_ys在xs为(?, 1)时的理解 问题简介 使用tensorflow1.15学习时,有一项tf.gradients的代码,其中用到了grad_ys这个参数,经过一些解析,得到了一些自己的理解 原代码 def fwd_gradients_1(self, U, x): g = tf.gradients(U, x, grad_ys=self.dummy_x1_tf)[0] return tf.gradients(g, self.d

sunshine9404的博客 2765

【MATLAB代码】基于水声通信(ACOMMS)下的到达时间差(TDOA)定位的AUV自主导航例程,附完整代码

水下AUV导航系统仿真研究 本研究基于到达时间差(TDOA)技术实现了水下自主航行器(AUV)的三维导航仿真系统。系统采用四个声学信标作为定位基准,通过TDOA测量数据迭代求解AUV位置。仿真结果表明: 导航性能:系统能够有效跟踪AUV从起点(30,30,-20)到目标点(70,70,-20)的航行轨迹,定位误差保持在合理范围内。 误差分析:定位误差变化曲线显示系统具有稳定的定位精度,平均误差为0.5米左右。 技术特点:采用两步最小二乘迭代算法求解非线性TDOA方程,提高了定位精度和计算效率。 该仿真系统为

985工科博士毕业,专攻定位、导航和滤波等算法研究。从业10年,主要使用MATLAB 320

tf.gradients()和tf.stop_gradient()

1、tf.gradients() tf.gradients( ys, xs, grad_ys=None, name='gradients', colocate_gradients_with_ops=False, gate_gradients=False, aggregation_method=None, stop_gradient...

weixin_36670529的博客 8524

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

CCS编译器报错#148怎么办?函数签名不一致的排查与修复

嵌入式开发中,编译器的诊断信息往往让人困惑,尤其是CCS中常见的#148错误。函数签名是C语言中声明与定义匹配的关键,当编译器发现同名函数前后签名不一致时,就会报出“declaration is incompatible”。理解其原理,能帮助开发者快速定位问题。在TI MSP430、C2000或DSP等平台的CCS工程中,常见原因包括头文件与源文件声明错位、interrupt关键字遗漏、volatile类型不匹配等。掌握系统排查方法,从错误信息定位、逐项比对签名、清理重建到检查include路径,能够显著提

weixin_34279184的博客 366

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

利用-tf-gradients-在-TensorFlow-中实现梯度下降

作者:chen_h 微信号 & QQ:862251340 微信公众号:coderpai 我喜欢 TensorFlow 的其中一个原因是它可以自动的计算函数的梯度。我们只需要设计我们的函数,然后去调用 tf.gradients 函数就可以了。是不是非常简单。 接下来让我们来举个例子,具体说明一下。 使用 TensorFlow 内置的优化器对 MNIST 数据集进行 soft...

CoderPai的博客 1106

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

tf.gradients以及利用tf.gradients 实现回归

参考: 1、Tensorflow-吴恩达老师课程笔记 2、利用 tf.gradients 在 TensorFlow 中实现梯度下降 1理论 2使用TensorFlow 内置的优化器对 数据集进行回归 3利用 tfgradients 在 TensorFlow 中实现梯度下降 1、理论 1、动量梯度下降法 参考:Tensorflow-吴恩达老师课程笔记 2、使用TensorFlow 内置的优...

672

Tensorflow实现梯度下降各种方法

参考:利用 tf.gradients 在 TensorFlow 中实现梯度下降 1、不使用Tensorflow任何梯度下降方法 2、使用tf.gradients实现梯度下降 3、使用Tensorflow内置优化器 3.1 minimize 3.2 compute_gradients与apply_gradients 3.3 compute_gradients与apply_gradients...

风吴痕的博客 1万+

灵活使用Tensorflow执行梯度下降算法

之前写过有关tensorflow中各种梯度的意义了,这里结合一下梯度下降算法,讲一下如何使用tensorflow进行相关梯度下降算法的实验。 还是再啰嗦一遍吧。。嫌不够仔细的可以参见: https://blog.csdn.net/edward_zcl/article/details/90345318 声明: 参考官方文档 参考tensorflow学习笔记(三十) 关于神经网络中的梯度计算,推荐吴...

edward_zcl的博客 1140

TensorFlow 优化器

本文介绍了TensorFlow中的优化器及其核心功能。优化器作为扩展类,通过附加信息提升模型训练的速度和性能,无需使用张量即可初始化。重点讲解了随机梯度下降(SGD)优化器的实现,包括其代码示例和关键参数:损失函数(cost)、可训练参数(params)和学习率(lr)。文章还列举了TensorFlow支持的多种优化算法,并解释了梯度裁剪、参数更新等核心概念。优化器通过计算梯度(tf.gradients)和参数赋值(param.assign)实现模型参数的迭代更新。

路漫漫其修远兮,吾将上下而求索 534

TensorFlow—计算梯度与控制梯度 : tf.gradients和compute_gradients和apply_gradients和clip_by_global_norm控制梯度

TensorFlow的梯度 我们知道训练神经网络有一个很重要的就是反向传播更新参数,如果没有经历过2015-2017年的神经网络的研究生,这一步听陌生的,但是不重要,我们知道TensorFlow给我们API怎么用就行了。 对于反向传播这一步,我们常见的代码是如下: # 损失计算,也就是优化对象 loss = tf.nn.............. # 反向传播 # 定义优化器,学习率定义1.0 ...

xinjieyuan的博客 6828

深入理解Tensorflow中的梯度计算算子-tf.gradients()

转载:https://blog.csdn.net/hustqb/article/details/80260002声明:参考官方文档参考tensorflow学习笔记(三十)关于神经网络中的梯度计算,推荐吴恩达的deeplearning公开课tf.gradients()在tensorflow中,tf.gradients()的参数如下:tf.gradients(ys, xs, ...

David's Tweet 9364

tf.gradients实现回归

参考:1、Tensorflow-吴恩达老师课程笔记 2、利用 tf.gradients 在 TensorFlow 中实现梯度下降1理论 2使用TensorFlow 内置的优化器对 数据集进行回归 3利用 tfgradients 在 TensorFlow 中实现梯度下降1、理论1、动量梯度下降法 参考:Tensorflow-吴恩达老师课程笔记 2、使用TensorFlow 内置的优化器对 数据集

风吴痕的博客 1269

tf.gradients ---错误FetchargumentNonehasinvalidtype

使用tensorflow执行如下最简单梯度下降的代码: import tensorflow as tf w1 = tf.Variable([[1,2]]) w2 = tf.Variable([[3,4]]) y = tf.matmul(w1, [[9], [10]]) grads = tf.gradients(y, [w1]) with tf.Session() as sess: ...

monk1992的博客 759

tensorflow手动实现线性回归梯度下降

原理 模型表示: 数据要进行缩放归一化 代价函数: i表示第i个训练实例 j表示第j个特征 同时更新theta 用矩阵表示就是: error = y_pred - y – shape(m,1) 拆开用矩阵表示一下最后的求导更新过程: 假设训练数据规模m*n,m条训练数据,每条数据n个特征,所以有theta0 theta1 — thetan 代码如下: 准备数据: import nu...

BeforeEasy的博客 361

TensorFlow2自动梯度与优化器

自动梯度与优化器 待优化张量 为了区分需要计算梯度信息的张量(如参数)与不需要计算梯度信息的普通张量,tensorflow增加了一种专门的数据类型来支持梯度信息的记录:tf.Variable 可以通过tf.Variable()方法将普通张量转换成待优化张量 a=tf.constant([1,2,3]) aa=tf.Variable(a) tf.Variable()也可以直接创建待优化张量,用法与...

刘之帅 5452

tf求解梯度下降

自动求导记录器 在with上下文间的所有计算都会被记录下来,通过调用gradient()进行求导 import tensorflow as tf x = tf.Variable(initial_value=4.) with tf.GradientTape() as tape: y = tf.square(x) y_grad = tape.gradient(y, x) print(y, y_grad) y=x²,当x=4时,y=16 y关于x的导数y’=2x,当x=4时,

spiderfu的博客 328
上一篇: 深度学习在股票市场的应用
下一篇: 如何评价我们分类模型的性能?
coderpai
博客等级 码龄10年 1082粉丝 469原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值