当前位置:网站首页>[tensorflow] 关于 seed
[tensorflow] 关于 seed
2022-07-25 22:45:00 【hanjialeOK】
目前我的所有代码都是基于 tensorflow1.15,实验中设置种子的方式为
tf.compat.v1.set_random_seed(args.seed)
np.random.seed(args.seed)
random.seed(args.seed)
这样设置后,相同 seed 的实验结果基本上是一样的(网络模型的初始参数是不变的,每一步的结果都是固定的)。但是,如果对 tf 的 graph 做出些许无影响改变,如:多加一个无用的 placeholder,多加一个无用的全连接层等等,每一步的结果就会和之前未修改的时候有区别。
举个例子,算法 algo1.py 和 algo2.py,后者的逻辑比前者仅仅多了一个无用的 placeholder,即使两个算法的 seed 相同,每一步的实验结果也会不一样。
边栏推荐
- Today, I sorted out some problems about high collapse
- Kibana~后台启动Kibana之后无法找到进程号
- To light up all the positions in the string that need to be lit, at least a few lights are needed
- Xiaobai programmer day 8
- 【Leetcode】502.IPO(困难)
- 为啥谷歌的内部工具不适合你?
- Floating effect and characteristics
- 【集训DAY12】X equation 【高精度】【数学】
- 【集训DAY15】简单计算【树状数组】【数学】
- [training day15] simple calculation [tree array] [mathematics]
猜你喜欢
随机推荐
Data type conversion
Kibana~ the process number cannot be found after kibana is started in the background
冯诺依曼体系结构
Anaconda~Upload did not complete.
Interview question 17.11. word distance ●●
LabVIEW 开发 PCI-1680U双端口CAN卡
Matrixcube unveils the complete distributed storage system matrixkv implemented in 102-300 lines
Node.js operation database
Day006 select structure (if statement exercise)
What is the difference between bio, NiO and AIO?
Force deduction solution summary 919 complete binary tree inserter
Mysql数据类型
(1) Integrating two mapping frameworks of Dao
Experiment 1, experiment 2 and Experiment 3 of assembly language and microcomputer principle: branch program design / loop program design / subroutine design
依法严厉打击违规自媒体运营者:净化自媒体行业迫在眉睫
[training day15] simple calculation [tree array] [mathematics]
分享两个音乐播放地址
Tree view model example of QT
Simulated Xiaomi mall head home page
Pyspark data analysis basis: pyspark.sql.sparksession class method explanation and operation + code display

![[training Day12] be go! [dynamic programming] [mathematics]](/img/63/689c17a0aae22ba25600b136178bf6.png)







