当前位置:网站首页>[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 相同,每一步的实验结果也会不一样。
边栏推荐
- Ribbon execution logic source code analysis
- 【集训DAY13】Backpack【动态规划】【贪心】
- To light up all the positions in the string that need to be lit, at least a few lights are needed
- The third programming competition of Wuhan University of technology b- save the kingdom of DAG (topological properties deal with accessibility Statistics)
- JSON object
- 【Leetcode】502.IPO(困难)
- 1000个Okaleido Tiger首发上线Binance NFT,引发抢购热潮
- Compiler introduction
- Domain oriented model programming
- Short circuit and &, short circuit or |, logic and &, logic or |; Conditional operator
猜你喜欢

软件测试 pytest pytest的命名规则 用例的前后置 conftest.py 定制allure报告 @pytest.mark.parametrize()装饰器作数据驱动

The third programming competition of Wuhan University of technology b- save the kingdom of DAG (topological properties deal with accessibility Statistics)

武汉理工大学第三届程序设计竞赛 B-拯救DAG王国(拓扑性质处理可达性统计问题)

LabVIEW 开发 PCI-1680U双端口CAN卡

Anaconda~Upload did not complete.

The price of dividing gold bars
![[MySQL rights] UDF rights (with Malaysia)](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[MySQL rights] UDF rights (with Malaysia)

DOM event binding

Compiler introduction

【集训DAY13】Out race【数学】【动态规划】
随机推荐
QT log file system
关于getchar和scanf的使用示例及注意点
Node.js operation database
Day006 select structure (if statement exercise)
Simulated Xiaomi mall head home page
LabVIEW develops PCI-1680U dual port can card
Two methods of printing strings in reverse order in C language
[MySQL rights] UDF rights (with Malaysia)
The price of dividing gold bars
Compiler introduction
Gan, why '𠮷 𠮷'.Length== 3 ??
Severely crack down on illegal we media operators according to law: it is urgent to purify the we media industry
recyclerview计算滑动距离之computeHorizontalScrollExtent-computeHorizontalScrollRange-computeHorizontalScrol
[training day13] backpack [dynamic planning] [greed]
Learning orientation today
Binder原理
Box model (2)
DOM event object
Websocket summary
721. 账户合并 ●●、并查集