caffe的python接口学习(12):查看属性、方法以及函数参数
2017-01-14 09:51
961 查看
1.使用dir命令查看属性和方法
dir(solver.net)
"""
查看 sovler.net 属性
'forward': 前向传播
'backward': 反向传播
'params': 保存各层的参数值(w和b)
'blobs': 保存各层的数据值
'bottom_names': 每一层中底层的名称
'top_names': 每一层中顶层的名称
'inputs': 输入
'outputs': 输出
'blob_loss_weights':
'clear_param_diffs':
'copy_from': 拷贝权重
'forward_all': 批量前向传播
'forward_backward_all': 批量反向传播
'layers':
'load_hdf5'
'reshape':
'save':
'save_hdf5':
'set_input_arrays':
'share_with'
"""
dir(sovler.net.blobs)
dir(solver.net.params)
"""
查看 blobs,param 属性
'clear':
'copy':
'fromkeys':
'get':
'has_key':
'items':
'iteritems':
'iterkeys':
'itervalus':
'keys':
'pop':
'popitem':
'values':
'update'
'viewitems':
'viewkeys':
'viewvalus':
"""
2.使用help()查看函数的输入和输出
help(solver.net.forward)
help(solver.net.forward_all)
Help on method
_Net_forward_all in module caffe.pycaffe:
_Net_forward_all(self, blobs=None, **kwargs) method of caffe._caffe.Net instance
Run net forward in batches.
Parameters
----------
blobs : list of blobs to extract as in forward()
kwargs : Keys are input blob names and values are blob ndarrays.
Refer to forward().
Returns
-------
all_outs : {blob name: list of blobs} dict.
None
Help on method
_Net_forward in module caffe.pycaffe:
_Net_forward(self, blobs=None, start=None, end=None, **kwargs) method of caffe._caffe.Net instance
Forward pass: prepare inputs and run the net forward.
Parameters
----------
blobs : list of blobs to return in addition to output blobs.
kwargs : Keys are input blob names and values are blob ndarrays.
For formatting inputs for Caffe, see Net.preprocess().
If None, input is taken from data layers.
start : optional name of layer at which to begin the forward pass
end : optional name of layer at which to finish the forward pass
(inclusive)
Returns
-------
outs : {blob name: blob ndarray} dict.
None
dir(solver.net)
"""
查看 sovler.net 属性
'forward': 前向传播
'backward': 反向传播
'params': 保存各层的参数值(w和b)
'blobs': 保存各层的数据值
'bottom_names': 每一层中底层的名称
'top_names': 每一层中顶层的名称
'inputs': 输入
'outputs': 输出
'blob_loss_weights':
'clear_param_diffs':
'copy_from': 拷贝权重
'forward_all': 批量前向传播
'forward_backward_all': 批量反向传播
'layers':
'load_hdf5'
'reshape':
'save':
'save_hdf5':
'set_input_arrays':
'share_with'
"""
dir(sovler.net.blobs)
dir(solver.net.params)
"""
查看 blobs,param 属性
'clear':
'copy':
'fromkeys':
'get':
'has_key':
'items':
'iteritems':
'iterkeys':
'itervalus':
'keys':
'pop':
'popitem':
'values':
'update'
'viewitems':
'viewkeys':
'viewvalus':
"""
2.使用help()查看函数的输入和输出
help(solver.net.forward)
help(solver.net.forward_all)
Help on method
_Net_forward_all in module caffe.pycaffe:
_Net_forward_all(self, blobs=None, **kwargs) method of caffe._caffe.Net instance
Run net forward in batches.
Parameters
----------
blobs : list of blobs to extract as in forward()
kwargs : Keys are input blob names and values are blob ndarrays.
Refer to forward().
Returns
-------
all_outs : {blob name: list of blobs} dict.
None
Help on method
_Net_forward in module caffe.pycaffe:
_Net_forward(self, blobs=None, start=None, end=None, **kwargs) method of caffe._caffe.Net instance
Forward pass: prepare inputs and run the net forward.
Parameters
----------
blobs : list of blobs to return in addition to output blobs.
kwargs : Keys are input blob names and values are blob ndarrays.
For formatting inputs for Caffe, see Net.preprocess().
If None, input is taken from data layers.
start : optional name of layer at which to begin the forward pass
end : optional name of layer at which to finish the forward pass
(inclusive)
Returns
-------
outs : {blob name: blob ndarray} dict.
None
相关文章推荐
- caffe的python接口学习(8):caffemodel中的参数及特征的抽取
- Java基础学习笔记十二 类、抽象类、接口作为方法参数和返回值以及常用API
- python学习笔记12(函数三): 参数类型、递归、lambda函数
- 【caffe学习笔记之5】Win10系统下Caffe的Python接口设置方法并绘制网络结构图
- Thin的DateChooser代码学习(关于js的函数参数为一个完整的函数以及“对象不支持此属性或方法”错误的解决)(原创,转载请声明)
- 2.关于结构体以及结构体数组作为函数入口参数的方法(学习笔记)
- caffe的python接口学习(8):caffemodel中的参数及特征的抽取
- Uploadify 3.2 参数属性、事件、方法函数详解以及配置
- caffe的python接口学习(8):caffemodel中的参数及特征的抽取
- caffe的python接口学习(8):caffemodel中的参数及特征的抽取
- Uploadify 3.2 参数属性、事件、方法函数详解以及配置
- caffe的python接口学习:caffemodel中的参数及特征的抽取(转载)
- 深度学习Caffe实战笔记(12)Caffe 使用Python接口No module named google.protobuf.internal修复方案
- caffe的python接口学习(8):caffemodel中的参数及特征的抽取
- caffe的python接口学习(8):caffemodel中的参数及特征的抽取
- caffe的python接口学习(8):caffemodel中的参数及特征的抽取
- python学习笔记12(函数三): 参数类型、递归、lambda函数
- caffe的python接口学习(8):caffemodel中的参数及特征的抽取
- 【转】python 装饰器功能以及函数参数使用
- javascript学习笔记—DOM常用API、属性、方法、函数