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