Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no net component in the dagnet.net from demo.m file #8

Closed
fbiying87 opened this issue Aug 13, 2020 · 4 comments
Closed

no net component in the dagnet.net from demo.m file #8

fbiying87 opened this issue Aug 13, 2020 · 4 comments

Comments

@fbiying87
Copy link

Thanks for sharing your code with the community. I was testing it recently, but got the error in the demo.m.

Reference to non-existent field 'net'.
Error in demo (line 7)
dagnet = dagnn.DagNN.loadobj(dagnet.net) ;

I used the
net_path = 'DBCNN\dbcnn\models\LIVE_models\whole\imdb-seed-1.mat';
Is this the correct model? Thanks a lot for your support.

Best regards!

@zwx8981
Copy link
Owner

zwx8981 commented Aug 14, 2020

Hi,
You need to first train the DB-CNN on a database, the checkpoint will be automatically saved. Then you can load the checkpoint to test an image as in the demo.
imdb-seed-1.mat is the file containing the meta information that you need use to train and test the model.

We do not release the pre-trained DBCNN model in the github.

@fbiying87
Copy link
Author

thanks for your reply. I will try to train a simple model. Hopefully, it won't take too long, as I only have cpu on my laptop. :-)

Best regards!

@fbiying87
Copy link
Author

fbiying87 commented Aug 14, 2020

Thanks for your reply. I am currently working on downloading the correct databases. As for LIVE, they have a first and second release versions, can you provide a link to the database which you used to train the model please?

I noticed, that you used the release 2. Thanks.

I started training by running the run_exp script. But I received the following error. Should I set the opts.randomSeed=1?

Initialization: extracting bcnn feature of batch 98/98
layer| 0| 1| 2|
type| input| conv| pdist|

name n/a convfc loss
support n/a 1 1
filt dim n/a 65536 n/a
filt dilat n/a 1 n/a
num filts n/a 1 n/a
stride|    n/a|      1|      1|
   pad|    n/a|      0|      0|

----------|-------|-------|-------|
rf size| n/a| 1| 1|
rf offset| n/a| 1| 1|

rf stride n/a 1 1
data size NaNxNaN NaNxNaN NaNxNaN
data depth NaN 1 1
data num 8 8 8
---------- ------- ------- -------
data mem NaN NaN NaN
param mem n/a 256KB 0B

parameter memory|256KB (6.6e+04 parameters)|
data memory| NaN (for batch size 8)|

Error using rng (line 96)
The current random number generator is the legacy generator. This is because you have executed a command such as rand('state',0), which activates MATLAB's legacy random
number behavior. You may not use RNG to reseed the legacy random number generator.

Use rng('default') to reinitialize the random number generator to its startup configuration, or call RNG using a specific generator type, such as rng(seed,'twister').

Error in cnn_train (line 136)
rng(epoch + opts.randomSeed) ;

Error in initializeNetworkTwoStreams (line 280)
[netc, info] = cnn_train(netc, bcnndb, @getBatch_bcnn_fromdisk, opts.inittrain, ...

Error in imdb_bcnn_train_dag (line 70)
net = initNetFn(imdb, encoderOpts, opts);

Error in run_experiments_bcnn_train (line 37)
end

Error in run_exp (line 62)
[options, imdb] = run_experiments_bcnn_train(opts);

Thanks a lot!

@zwx8981
Copy link
Owner

zwx8981 commented Aug 15, 2020

I didn't meet this error before. Have you tried setting opts.randomSeed=1?

@zwx8981 zwx8981 closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants