Move the name of the module

This commit is contained in:
Goncalves Henriques, Andre (UG - Computer Science) 2024-04-21 15:15:00 +01:00
parent db661550e5
commit 9257404edd
116 changed files with 220 additions and 217 deletions

View File

@ -1,3 +1,6 @@
# Fork of gotch modified to work with my fyp project
# Gotch [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)[![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/sugarme/gotch?tab=doc)

View File

@ -3,7 +3,7 @@ package gotch
import (
"log"
lib "github.com/sugarme/gotch/libtch"
lib "git.andr3h3nriqu3s.com/andr3/gotch/libtch"
)
type Device struct {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"reflect"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// DataLoader combines a dataset and a sampler and provides

View File

@ -5,7 +5,7 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch/dutil"
"git.andr3h3nriqu3s.com/andr3/gotch/dutil"
)
func TestNewDataLoader(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch/dutil"
"git.andr3h3nriqu3s.com/andr3/gotch/dutil"
)
func TestNewSliceDataset(t *testing.T) {

View File

@ -3,7 +3,7 @@ package dutil_test
import (
"testing"
"github.com/sugarme/gotch/dutil"
"git.andr3h3nriqu3s.com/andr3/gotch/dutil"
)
func TestNewKFold(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch/dutil"
"git.andr3h3nriqu3s.com/andr3/gotch/dutil"
)
func TestSequentialSampler(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/vision"
"github.com/sugarme/gotch/vision/aug"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch/vision/aug"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func main() {

View File

@ -4,9 +4,9 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
const (

View File

@ -12,10 +12,10 @@ import (
"log"
"time"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
func convBn(p *nn.Path, cIn, cOut int64) *nn.SequentialT {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func main() {

View File

@ -5,8 +5,8 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
var device string

View File

@ -5,10 +5,10 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
var (

View File

@ -9,9 +9,9 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
var (

View File

@ -4,9 +4,9 @@ import (
"fmt"
"math/rand"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
const (

View File

@ -7,10 +7,10 @@ import (
"sync"
"time"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
func main() {

View File

@ -7,10 +7,10 @@ import (
"sync"
"time"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
const (

View File

@ -3,9 +3,9 @@ package main
import (
"fmt"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
const (

View File

@ -3,7 +3,7 @@ package main
import (
"flag"
"github.com/sugarme/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch"
)
var (

View File

@ -5,10 +5,10 @@ import (
"log"
"runtime"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
const (

View File

@ -10,10 +10,10 @@ import (
"path/filepath"
"time"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
const (

View File

@ -4,8 +4,8 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/pickle"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/pickle"
)
func main() {

View File

@ -10,10 +10,10 @@ import (
"path/filepath"
"strings"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
var (

View File

@ -4,9 +4,9 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func main() {

View File

@ -9,10 +9,10 @@ import (
"log"
"path/filepath"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
var (

View File

@ -17,9 +17,9 @@ import (
"log"
"math/rand"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
var (

View File

@ -9,9 +9,9 @@ import (
"strconv"
"strings"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
type Block struct {

View File

@ -15,8 +15,8 @@ import (
"golang.org/x/image/draw"
"golang.org/x/image/font"
"github.com/sugarme/gotch/example/yolo/freetype"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/example/yolo/freetype"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
var (

View File

@ -8,10 +8,10 @@ import (
"path/filepath"
"sort"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
const (

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/sugarme/gotch
module git.andr3h3nriqu3s.com/andr3/gotch
go 1.20

View File

@ -6,7 +6,7 @@ import (
"math"
"testing"
float16 "github.com/sugarme/gotch/half"
float16 "git.andr3h3nriqu3s.com/andr3/gotch/half"
)
// prevent compiler optimizing out code by assigning to these

View File

@ -11,7 +11,7 @@ import (
"math"
"testing"
float16 "github.com/sugarme/gotch/half"
float16 "git.andr3h3nriqu3s.com/andr3/gotch/half"
)
// wantF32toF16bits is a tiny subset of expected values

View File

@ -5,7 +5,7 @@ package nn
import (
"log"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Batch-normalization config.

View File

@ -5,7 +5,7 @@ package nn
import (
"log"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
type ConvTranspose1DConfig struct {

View File

@ -7,7 +7,7 @@ import (
"math"
"reflect"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Conv1DConfig:

View File

@ -3,7 +3,7 @@ package nn
// Layers defined by closure
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
type Func struct {

View File

@ -6,8 +6,8 @@ import (
"math"
"strings"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
type Init interface {

View File

@ -5,8 +5,8 @@ import (
"testing"
"time"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Test whether InitTensor() can cause memory blow-up due to accumulate gradient.

View File

@ -5,7 +5,7 @@ import (
"log"
"strings"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// TrainableCModule is a trainable version of JIT Pytorch module

View File

@ -2,7 +2,7 @@ package nn
// A layer-normalization layer.
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Layer-normalization config.

View File

@ -6,7 +6,7 @@ import (
"fmt"
"math"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// LinearConfig is a configuration for a linear layer

View File

@ -1,7 +1,7 @@
package nn
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
type lossFnOptions struct {

View File

@ -7,7 +7,7 @@ import (
"log"
"math"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Optimizer is a struct object to run gradient descent.

View File

@ -4,9 +4,9 @@ import (
"fmt"
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func TestOptimizer(t *testing.T) {

View File

@ -1,7 +1,7 @@
package nn
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Dropout:

View File

@ -3,8 +3,8 @@ package nn
import (
"fmt"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
type State interface{}

View File

@ -5,9 +5,9 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func gruTest(rnnConfig *nn.RNNConfig, t *testing.T) {

View File

@ -6,8 +6,8 @@ import (
"math"
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
)
func TestLambdaLR(t *testing.T) {

View File

@ -3,8 +3,8 @@ package nn
// A sequential layer used to chain multiple layers and closures.
import (
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Sequential is a layer (container) that combines multiple other layers.

View File

@ -3,7 +3,7 @@ package nn
// Sparse layers
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Configuration option for an embedding layer.

View File

@ -4,9 +4,9 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func embeddingTest(embeddingConfig *nn.EmbeddingConfig, t *testing.T) {

View File

@ -8,8 +8,8 @@ import (
"strings"
"sync"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// SEP is a separator to separate path elements in the tensor names.

View File

@ -8,9 +8,9 @@ import (
"testing"
"time"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func TestVarStoreEntry(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/pickle"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/pickle"
)
func ExampleLoadInfo() {

View File

@ -20,9 +20,9 @@ import (
"reflect"
"sort"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
const hexMagicNumber = "1950a86a20f9469cfc6c"

View File

@ -6,8 +6,8 @@ import (
"io"
"math"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/half"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/half"
)
// This file implements Pytorch storage data types.

View File

@ -3,8 +3,8 @@ package ts_test
import (
"fmt"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func ExampleTensor_MustArange() {

View File

@ -3,8 +3,8 @@ package ts_test
import (
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// GOMAXPROCS=8 go test -bench=BenchmarkConv2d -benchtime=100x -run=^a | tee op-conv-bench.txt

View File

@ -7,7 +7,7 @@ import (
"os"
"path/filepath"
"github.com/sugarme/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch"
)
// Iter2 is an iterator over a pair of tensors which have the same first dimension

View File

@ -8,8 +8,8 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func TestTextData_NewTextData(t *testing.T) {

View File

@ -8,7 +8,7 @@ import (
"runtime/debug"
"unsafe"
lib "github.com/sugarme/gotch/libtch"
lib "git.andr3h3nriqu3s.com/andr3/gotch/libtch"
)
// ptrToString check C pointer for null. If not null, get value

View File

@ -5,7 +5,7 @@ import "C"
import (
// "unsafe"
lib "github.com/sugarme/gotch/libtch"
lib "git.andr3h3nriqu3s.com/andr3/gotch/libtch"
)
// LoadHwc returns a tensor of shape [height, width, channels] on success.

View File

@ -66,7 +66,7 @@ import (
"log"
"reflect"
"github.com/sugarme/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch"
)
type NewAxis struct{}

View File

@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func TestIntegerIndex(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch"
)
type Iterator interface {

View File

@ -14,8 +14,8 @@ import (
"reflect"
"unsafe"
"github.com/sugarme/gotch"
lib "github.com/sugarme/gotch/libtch"
"git.andr3h3nriqu3s.com/andr3/gotch"
lib "git.andr3h3nriqu3s.com/andr3/gotch/libtch"
)
type CIValue struct {

View File

@ -4,7 +4,7 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func roundTrip(v interface{}, t *testing.T) {

View File

@ -5,7 +5,7 @@ package ts
import(
"log"
"github.com/sugarme/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch"
)

View File

@ -11,7 +11,7 @@ import (
"strconv"
"strings"
"github.com/sugarme/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch"
)
const (

View File

@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func TestNpyHeaderParse(t *testing.T) {

View File

@ -3,7 +3,7 @@ package ts
import (
"log"
lib "github.com/sugarme/gotch/libtch"
lib "git.andr3h3nriqu3s.com/andr3/gotch/libtch"
)
type COptimizer struct {

View File

@ -3,8 +3,8 @@ package ts_test
import (
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func ExampleTensor_Split(t *testing.T) {

View File

@ -7,7 +7,7 @@ import (
"log"
"unsafe"
lib "github.com/sugarme/gotch/libtch"
lib "git.andr3h3nriqu3s.com/andr3/gotch/libtch"
)
// NOTE. This is a temporarily patched to make it run.

View File

@ -7,7 +7,7 @@ import (
"reflect"
"strconv"
"github.com/sugarme/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch"
)
func (ts *Tensor) ValueGo() interface{} {

View File

@ -4,8 +4,8 @@ import (
"fmt"
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func TestTensor_Format(t *testing.T) {

View File

@ -6,8 +6,8 @@ import (
"runtime"
"sync/atomic"
"github.com/sugarme/gotch"
lib "github.com/sugarme/gotch/libtch"
"git.andr3h3nriqu3s.com/andr3/gotch"
lib "git.andr3h3nriqu3s.com/andr3/gotch/libtch"
)
type Scalar struct {

View File

@ -9,8 +9,8 @@ import(
"unsafe"
"fmt"
"github.com/sugarme/gotch"
lib "github.com/sugarme/gotch/libtch"
"git.andr3h3nriqu3s.com/andr3/gotch"
lib "git.andr3h3nriqu3s.com/andr3/gotch/libtch"
)

View File

@ -17,8 +17,8 @@ import (
"time"
"unsafe"
gotch "github.com/sugarme/gotch"
lib "github.com/sugarme/gotch/libtch"
gotch "git.andr3h3nriqu3s.com/andr3/gotch"
lib "git.andr3h3nriqu3s.com/andr3/gotch/libtch"
)
var (

View File

@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/sugarme/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch"
)
var n int = 10

View File

@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func TestTensorInit(t *testing.T) {

View File

@ -12,7 +12,7 @@ import (
"reflect"
"unsafe"
gotch "github.com/sugarme/gotch"
gotch "git.andr3h3nriqu3s.com/andr3/gotch"
)
// nativeEndian is a ByteOrder for local platform.

View File

@ -1,8 +1,8 @@
package vision
import (
"github.com/sugarme/gotch/nn"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/nn"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// AlexNet implementation

View File

@ -1,8 +1,8 @@
package aug
import (
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// RandomAffine is transformation of the image keeping center invariant.

View File

@ -4,8 +4,8 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
type GaussianBlur struct {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Ref. https://github.com/pytorch/vision/blob/f1d734213af65dc06e777877d315973ba8386080/torchvision/transforms/functional_tensor.py

View File

@ -1,7 +1,7 @@
package aug
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// RandomAutocontrast autocontrasts the pixels of the given image randomly with a given probability.

View File

@ -6,8 +6,8 @@ import (
// "math"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
type RandomCrop struct {

View File

@ -5,8 +5,8 @@ import (
"log"
"math"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Randomly selects a rectangle region in an torch Tensor image and erases its pixels.

View File

@ -1,7 +1,7 @@
package aug
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// RandomEqualize equalizes the histogram of the given image randomly with a given probability.

View File

@ -1,8 +1,8 @@
package aug
import (
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// RandomHorizontalFlip horizontally flips the given image randomly with a given probability.

View File

@ -7,8 +7,8 @@ import (
"math/rand"
"time"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func gaussianKernel1D(ks int64, sigma float64, dtype gotch.DType, device gotch.Device) *ts.Tensor {

View File

@ -3,7 +3,7 @@ package aug
import (
"log"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// GrayScale converts image to grayscale.

View File

@ -1,7 +1,7 @@
package aug
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
type RandomInvert struct {

View File

@ -1,7 +1,7 @@
package aug
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// Normalize normalizes a tensor image with mean and standard deviation.

View File

@ -3,8 +3,8 @@ package aug
import (
// "fmt"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// RandomPerspective performs a random perspective transformation of the given image with a given probability.

View File

@ -1,7 +1,7 @@
package aug
import (
"github.com/sugarme/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
// RandomPosterize posterizes the image randomly with a given probability by reducing the

View File

@ -4,9 +4,9 @@ import (
"fmt"
"log"
"github.com/sugarme/gotch"
"github.com/sugarme/gotch/ts"
"github.com/sugarme/gotch/vision"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
"git.andr3h3nriqu3s.com/andr3/gotch/vision"
)
type ResizeModule struct {

Some files were not shown because too many files have changed in this diff Show More