More work on tring to make torch work

This commit is contained in:
2024-04-23 00:14:35 +01:00
parent 703fea46f2
commit a4a9ade71f
7 changed files with 109 additions and 43 deletions

View File

@@ -107,6 +107,7 @@ func NewFlatten() *Flatten {
// The flatten layer does not to move anything to the device
func (b *Flatten) ExtractFromVarstore(vs *my_nn.VarStore) {}
func (b *Flatten) Debug() {}
// Forward method
func (b *Flatten) Forward(x *torch.Tensor) *torch.Tensor {
@@ -133,6 +134,7 @@ func NewSigmoid() *Sigmoid {
// The sigmoid layer does not need to move anything to another device
func (b *Sigmoid) ExtractFromVarstore(vs *my_nn.VarStore) {}
func (b *Sigmoid) Debug() {}
func (b *Sigmoid) Forward(x *torch.Tensor) *torch.Tensor {
out, err := x.Sigmoid(false)