mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
first shot at local install
This commit is contained in:
parent
8eff95d047
commit
87163d971a
8
init.lua
8
init.lua
|
|
@ -66,6 +66,14 @@ function torch.setdefaulttensortype(typename)
|
|||
end
|
||||
end
|
||||
|
||||
local localinstalldir = paths.concat(os.getenv('HOME'),'.torch','usr')
|
||||
if paths.dirp(localinstalldir) then
|
||||
package.path = package.path .. ';' .. paths.concat(localinstalldir,'share','torch','lua','?','init.lua')
|
||||
package.path = package.path .. ';' .. paths.concat(localinstalldir,'share','torch','lua','?.lua')
|
||||
package.cpath = package.cpath .. ';' .. paths.concat(localinstalldir,'lib','torch','?.so')
|
||||
package.cpath = package.cpath .. ';' .. paths.concat(localinstalldir,'lib','torch','?.dylib')
|
||||
end
|
||||
|
||||
torch.setdefaulttensortype('torch.DoubleTensor')
|
||||
|
||||
torch.include('torch', 'Tensor.lua')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user