Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
package deepwit.activation

export dimwit.nn.ActivationFunctions.*
import dimwit.*

def sigmoid[T <: Tuple: Labels, V: IsFloating](t: Tensor[T, V]): Tensor[T, V] = t.sigmoid

def relu[T <: Tuple: Labels, V: IsFloating](t: Tensor[T, V]): Tensor[T, V] = t.relu

def gelu[T <: Tuple: Labels, V: IsFloating](t: Tensor[T, V]): Tensor[T, V] = t.gelu

def softmax[L: Label, V: IsFloating](t: Tensor1[L, V]): Tensor1[L, V] = t.softmax(Axis[L])
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package deepwit.activation

import deepwit.*
import dimwit.*
import deepwit.*
import deepwit.activation.softmax
import org.scalatest.matchers.should.Matchers
import org.scalatest.funspec.AnyFunSpec

Expand Down
2 changes: 1 addition & 1 deletion examples/src/main/scala/deepwit/examples/gpt/GPT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package deepwit.examples.gpt

import dimwit.*
import dimwit.Conversions.given
import nn.ActivationFunctions.softmax
import deepwit.activation.softmax
import deepwit.attention.{Head, HeadKey, HeadQuery, HeadValue}
import dimwit.stats.Categorical
import deepwit.embedder.VocabularyEmbedder
Expand Down
Loading