updated
This commit is contained in:
parent
11d345360d
commit
f76566834c
|
@ -107,9 +107,9 @@ func main() {
|
|||
|
||||
startRAM := si.TotalRam - si.FreeRam
|
||||
|
||||
// cuda := gotch.CudaBuilder(0)
|
||||
// device := cuda.CudaIfAvailable()
|
||||
device := gotch.CPU
|
||||
cuda := gotch.CudaBuilder(0)
|
||||
device := cuda.CudaIfAvailable()
|
||||
// device := gotch.CPU
|
||||
|
||||
vs := nn.NewVarStore(device)
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ func (it *Iter2) Shuffle() {
|
|||
it.xs = it.xs.MustIndexSelect(0, index, true)
|
||||
it.ys = it.ys.MustIndexSelect(0, index, true)
|
||||
|
||||
index.MustDrop()
|
||||
}
|
||||
|
||||
// ToDevice transfers the mini-batches to a specified device.
|
||||
|
|
Loading…
Reference in New Issue
Block a user