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

UndefVarError: @knet not defined #59

Closed
bedapisl opened this issue Jan 14, 2017 · 2 comments
Closed

UndefVarError: @knet not defined #59

bedapisl opened this issue Jan 14, 2017 · 2 comments

Comments

@bedapisl
Copy link

bedapisl commented Jan 14, 2017

So I followed this tutorial for installation of Knet. The tests are OK, but first example does not work:

julia> Pkg.add("Knet")
INFO: Installing AutoGrad v0.0.4
INFO: Installing Knet v0.8.1
INFO: Building Knet
make: 'libknet8.so' is up to date.
INFO: Package database updated

julia> Pkg.build("Knet")
INFO: Building Knet
make: 'libknet8.so' is up to date.

julia> Pkg.test("Knet")
INFO: Testing Knet
INFO: No GPU found, Knet using the CPU
(:epoch,0,:loss,461.77524366804886)
(:epoch,1,:loss,3.3320559275652433)
(:epoch,2,:loss,0.1199614974011731)
(:epoch,3,:loss,0.005568748814864047)
(:epoch,4,:loss,0.0012351227916297506)
(:epoch,5,:loss,0.0010684746173929085)
(:epoch,6,:loss,0.00109180688895586)
(:epoch,7,:loss,0.001015281814462818)
(:epoch,8,:loss,0.0010581459658679027)
(:epoch,9,:loss,0.0010342780204682569)
(:epoch,10,:loss,0.0010601555948864918)
  2.051864 seconds (1.83 M allocations: 508.324 MB, 1.79% gc time)
INFO: Knet tests passed

julia> using Knet

julia> @knet function linreg(x)
                  w = par(dims=(1,13), init=Gaussian(0, 0.1))
                  b = par(dims=(1,1), init=Constant(0))
                  return w * x .+ b
              end
ERROR: UndefVarError: @knet not defined
@ereday
Copy link
Collaborator

ereday commented Jan 14, 2017

The link you provided contains Knet7 tutorial. On the other hand, you're using the Knet8. You can find tutorial for the latest version of Knet (Knet8) here

@bedapisl
Copy link
Author

Thanks for answer. And is it possible to install the older version (Knet7) somehow? Because I am trying to run code, which looks like it uses the version 7.

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