Skip to content

Commit

Permalink
trainer resource as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-yong-zhi committed Jul 17, 2021
1 parent e7d3fc9 commit 64d25a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Stuffing"
uuid = "4175e07e-e5b7-423e-8796-3ea7f6d48281"
authors = ["guoyongzhi <guo-yong-zhi@outlook.com>"]
version = "0.4.0"
version = "0.4.1"

[deps]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
3 changes: 1 addition & 2 deletions src/train.jl
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ end

function train!(ts, nepoch::Number=-1, args...;
trainer=trainepoch_EM2!, patient::Number=trainer(:patient), optimiser=Momentum=1/4, ρ=0.5),
callbackstep=1, callbackfun=x->x, teleporting=i->true, kargs...)
callbackstep=1, callbackfun=x->x, teleporting=i->true, resource=trainer(inputs=ts), kargs...)
teleporton = true
if teleporting isa Function
on = teleporting
Expand All @@ -495,7 +495,6 @@ function train!(ts, nepoch::Number=-1, args...;
nc_min_g = typemax(Int)
teleport_count = 0.
last_cinds = nothing
resource = trainer(inputs=ts)
collpool = nothing
if :collpool in keys(resource)
collpool = resource[:collpool]
Expand Down

2 comments on commit 64d25a7

@guo-yong-zhi
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/41096

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.1 -m "<description of version>" 64d25a7d95a00298b8ab415cc3771c8116cdf932
git push origin v0.4.1

Please # to comment.