当前位置:网站首页>[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 相同,每一步的实验结果也会不一样。
边栏推荐
- 【PMP学习笔记】第1章 PMP体系引论
- 【集训DAY15】好名字【hash】
- QT的Tree View Model示例
- Select structure if branch structure
- Structure principle of micro ball vibration switch with chip
- 新媒体运营策略(以小红书为例)帮助你快速掌握爆款创作方法
- 编译器引论
- Session and cookie, token and storage
- xss-工具-Beef-Xss安装以及使用
- recyclerview计算滑动距离之computeHorizontalScrollExtent-computeHorizontalScrollRange-computeHorizontalScrol
猜你喜欢

冯诺依曼体系结构

JVM内存区域

Structure principle of micro ball vibration switch with chip

Summary 1 - deep learning - basic knowledge learning

MatrixCube揭秘102——300行实现的完整分布式存储系统MatrixKV
![[training day13] backpack [dynamic planning] [greed]](/img/a7/3df395d84f510dea8b42ebcc4ff5f2.png)
[training day13] backpack [dynamic planning] [greed]

Anaconda~Upload did not complete.

关于getchar和scanf的使用示例及注意点

XSS tool beef XSS installation and use

Two methods of printing strings in reverse order in C language
随机推荐
力扣解法汇总919-完全二叉树插入器
The new media operation strategy (taking xiaohongshu as an example) helps you quickly master the creative method of popular models
英文术语对应的解释
Matrixcube unveils the complete distributed storage system matrixkv implemented in 102-300 lines
沃达德软件:智慧城市方案
Xiaobai programmer day 8
Severely crack down on illegal we media operators according to law: it is urgent to purify the we media industry
Examples and points for attention about the use of getchar and scanf
Scratch seamless butt bron filter
JSON object
Can generic types be used in array
【集训DAY13】Backpack【动态规划】【贪心】
冯诺依曼体系结构
【集训DAY11】Calc【数学】
软件测试 pytest pytest的命名规则 用例的前后置 conftest.py 定制allure报告 @pytest.mark.parametrize()装饰器作数据驱动
JVM内存区域
Two methods of printing strings in reverse order in C language
Pyspark data analysis basis: pyspark.sql.sparksession class method explanation and operation + code display
If jimureport building block report is integrated according to the framework
[database learning] redis parser & single thread & Model