BVLC / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
34.14k stars 18.68k forks source link

AttributeError: "can't set attribute" #6307

Closed yunpengzhu closed 6 years ago

yunpengzhu commented 6 years ago

Issue summary

Try to fill the filter weights and bias into the Layer.Convolution in pycaffe. net.params['convres'][0].data= data2 net.params['convres'][0].data points to the filter weights correctly. But it triggers the assertion when assign data to it. Is there any solid way to fill the filter weights and bias into Convolution function in python? I try to design a 3d convolution and needs to debug it step by step with the known filter weights.

Steps to reproduce

If you are having difficulty building Caffe or training a model, please ask the caffe-users mailing list. If you are reporting a build error that seems to be due to a bug in Caffe, please attach your build configuration (either Makefile.config or CMakeCache.txt) and the output of the make (or cmake) command.

Your system configuration

Operating system: ubuntu16 (x64) Compiler: g++ CUDA version (if applicable): cuda8 CUDNN version (if applicable):cudnn7 BLAS: Python or MATLAB version (for pycaffe and matcaffe respectively):python27

Noiredd commented 6 years ago

You want to do

net.params['convres'][0].data[...] = data2

to actually copy the content of data2 into the param.