zoukankan      html  css  js  c++  java
  • python库--tensorflow--scope命名方式

    方法   参数 说明
    .name_scope() with...: name 在其下使用Variable, 变量名(V_n)前会被加上'name/...'且相同V_n会自动添加后缀加以区分, 使用get_variable, V_n不会变化, 且出现相同V_n会报错
    default_name=None 如果`name`参数是`None`,则使用默认名称
    values=None  
           
    .variable_scope() with...as sc: name_or_scope Variable以及get_variable变量名(V_n)前面都会被加上'name/...'但只有Variable的V_n会自动加后缀区分, 而在get_variable重复V_n前面加上sc.reuse_variables()可实现变量复用(指向同一变量)不加则报错
    default_name=None 如果`name_or_scope`参数是`None`,则使用默认名称
    values=None  
    initializer=None 此范围内变量的默认初始值设定项
    regularizer=None 此范围内的变量的默认regularizer
    caching_device=None 此范围内的变量的默认缓存设备
    partitioner=None 此范围内变量的默认分区程序
    custom_getter=None 这个范围内的变量的默认自定义getter
    reuse=None  
    dtype=None 在此作用域中创建的变量类型
    use_resource=None  
           
    sc.reuse_variable()     声明下一个变量是复用(即两个变量指向同一变量)变量
  • 相关阅读:
    3.css中的颜色
    5.html5中的路径表示
    4.html5中超链接
    3.html5的文本元素
    2.html5的基本格式
    1.html5究竟是什么
    2.css选择器
    C++11--智能指针shared_ptr,weak_ptr,unique_ptr <memory>
    C++11--编译器生成的函数
    C++11--右值引用(Perfect Forwarding)
  • 原文地址:https://www.cnblogs.com/P--K/p/8259953.html
Copyright © 2011-2022 走看看