# Flux load and save

**URL:** <https://discourse.julialang.org/t/flux-load-and-save/43954>\
**Category:** Machine Learning\
**Tags:** flux\
**Created:** [July 30, 2020, 9:43am UTC](https://discourse.julialang.org/t/flux-load-and-save/43954 "2020-07-30T09:43:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruan\_Stander](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ruan_stander/32/11304_2.png) [@Ruan\_Stander](https://discourse.julialang.org/u/Ruan_Stander)\
**Post date:** [July 30, 2020, 9:43am UTC](https://discourse.julialang.org/t/flux-load-and-save/43954/1 "2020-07-30T09:43:38Z")

</div>

Does Flux Load/Save require the same variable name?

```julia
@save "30x30_64x64.bson" model

@load "30x30_64x64.bson" model1

Error: Key model1 not found
```

---

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [July 30, 2020, 10:43am UTC](https://discourse.julialang.org/t/flux-load-and-save/43954/2 "2020-07-30T10:43:18Z")

</div>

Yes, according to [BSON.jl](https://github.com/JuliaIO/BSON.jl), which does the save and load. The value of model which you save is associated with the variable name you provide, so you have to use it to access the model again.

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [July 30, 2020, 11:38am UTC](https://discourse.julialang.org/t/flux-load-and-save/43954/3 "2020-07-30T11:38:46Z")

</div>

> [@anon37204545](#):
>
> he value of model which you save is associated with the variable name you provide

In other words `@load "30x30_64x64.bson"` should work. And you should have `model` in your environment after running it.
