DENG-MIT / Biomass.jl

Modeling Biomass Pyrolysis in Julia
MIT License
6 stars 7 forks source link

The error indicates that the file results/4s8r-01/checkpoint/mymodel.bson cannot be found. #7

Closed Dionysus7777777 closed 4 weeks ago

Dionysus7777777 commented 1 month ago

Hello, I apologize for bothering you again. It seems that I have resolved the environment issue, but now there's a problem where I can't get the expected result when running the main program. It seems that the program is unable to successfully save the file. The specific error is as follows:

image
jiweiqi commented 1 month ago

That's a check point file. You need to train a model first before load a checkpoint.

Dionysus7777777 commented 1 month ago

Sorry, I misunderstood. So, the crnn_cellulose.jl code is not used for training the network model? If I want to train a network model, which code should I use? Or should I be looking at the example code from the library CRNN instead

Dionysus7777777 commented 1 month ago

I encountered a similar issue when using the case2.jl code from CRNN. The results of running the code are as follows: species (column) reaction (row) species (column) reaction (row) species (column) reaction (row) species (column) reaction (row) species (column) reaction (row) species (column) reaction (row) species (column) reaction (row) w_in | w_b 3×8 Matrix{Float64}: 0.022 0.0 0.03 0.0 0.024 0.153 7.959 8.452 0.083 0.163 0.0 0.0 0.0 0.0 7.623 7.63 0.0 0.096 0.046 0.04 0.0 0.0 7.898 6.506 w_out 3×6 Matrix{Float64}: -0.022 0.007 -0.03 0.025 -0.024 -0.153 -0.083 -0.163 0.048 0.042 0.13 0.041 0.064 -0.096 -0.046 -0.04 0.029 0.108

ERROR: SystemError: opening file "./checkpoint/mymodel.bson": No such file or directory Stacktrace: [1] systemerror(p::String, errno::Int32; extrainfo::Nothing) @ Base .\error.jl:168 [2] #systemerror#62 @ .\error.jl:167 [inlined] [3] systemerror @ .\error.jl:167 [inlined] [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing) @ Base .\iostream.jl:293 [5] open @ .\iostream.jl:282 [inlined] [6] open(f::typeof(BSON.parse), args::String; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Base .\io.jl:328 [7] open @ .\io.jl:328 [inlined] [8] parse @ C:\Users\lenovo.julia\packages\BSON\73cTU\src\read.jl:106 [inlined] [9] load (repeats 2 times) @ C:\Users\lenovo.julia\packages\BSON\73cTU\src\read.jl:108 [inlined] [10] macro expansion @ C:\Users\lenovo.julia\packages\BSON\73cTU\src\BSON.jl:50 [inlined] [11] top-level scope @ c:\Users\lenovo\Desktop\CRNN-main\case2\case2.jl:184

Dionysus7777777 commented 1 month ago

I can now correctly use the CRNN/case1 code, but it seems that there is still an issue with the Biomass code where the model cannot be found. Could this be a problem with the path settings?

Dionysus7777777 commented 4 weeks ago

Sorry for bothering you with this issue. I have already resolved it. It was a simple problem—it was actually related to setting is_restart to false in the config.yaml file when using it for the first time. Although it’s a simple issue, I got stuck for a while at the beginning due to my unfamiliarity with the process. I apologize for the trouble. Anyone using this code for the first time in the future can refer to this issue for guidance.