... Q, K, V)
METHOD Backward(d_output)
METHOD InitGradients()
ENDCLASS
METHOD New(d_model, n_heads) CLASS MultiHeadAttention
LOCAL scale := 1.0 / Sqrt(d_model)
// Guardamos d_model como propiedad de la clase
::d_model := d_model
// Inicializar matrices de pesos
::WQ := hb_MatrixScale(hb ...
Search found 19 matches: sqrt
Searched query: sqrt
- Sat Jan 11, 2025 8:23 pm
- Forum: Artificial Intelligence examples
- Topic: CLASS Transformer
- Replies: 2
- Views: 806
- Sat Jan 11, 2025 8:06 pm
- Forum: Artificial Intelligence examples
- Topic: CLASS Transformer
- Replies: 2
- Views: 806
Re: CLASS Transformer
... METHOD Forward(Q, K, V)
METHOD Backward(d_output) VIRTUAL
ENDCLASS
METHOD New(d_model, n_heads) CLASS MultiHeadAttention
LOCAL scale := 1.0 / Sqrt(d_model)
::WQ := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::WK := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale ...
METHOD Backward(d_output) VIRTUAL
ENDCLASS
METHOD New(d_model, n_heads) CLASS MultiHeadAttention
LOCAL scale := 1.0 / Sqrt(d_model)
::WQ := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::WK := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale ...
- Sat Jan 11, 2025 9:31 am
- Forum: Artificial Intelligence examples
- Topic: CLASS Transformer
- Replies: 2
- Views: 806
CLASS Transformer
... weights, output
// Producto punto escalado
scores := hb_MatrixMultiply(Q, hb_MatrixTranspose(K))
scaled_scores := hb_MatrixScale(scores, 1 / Sqrt(::d_model))
// Aplicar softmax
attention_weights := hb_Softmax(scaled_scores)
// Atención ponderada
output := hb_MatrixMultiply(attention ...
// Producto punto escalado
scores := hb_MatrixMultiply(Q, hb_MatrixTranspose(K))
scaled_scores := hb_MatrixScale(scores, 1 / Sqrt(::d_model))
// Aplicar softmax
attention_weights := hb_Softmax(scaled_scores)
// Atención ponderada
output := hb_MatrixMultiply(attention ...
- Mon Jan 24, 2022 6:32 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Raiz Cuadrada
- Replies: 3
- Views: 558
Re: Raiz Cuadrada
SET DECIMALS, Exp(), Log(), Sqrt(), Val(), Set()
Saludos.
Code: Select all | Expand
SET DECIMAL TO 5
? Sqrt( 632512.62541 )
? Sqrt( 845414111.91440 )
Saludos.
- Mon Jan 24, 2022 6:24 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Raiz Cuadrada
- Replies: 3
- Views: 558
Re: Raiz Cuadrada
Buenas tardes Jairo !
No tengo claro si es esto lo que necesitas https://harbour.github.io/doc/clc53.html#sqrt .
O si lo que necesitas es esto https://www.superprof.es/apuntes/escolar/matematicas/aritmetica/naturales/calculo-de-la-raiz-cuadrada.html .
Muchas gracias ...
No tengo claro si es esto lo que necesitas https://harbour.github.io/doc/clc53.html#sqrt .
O si lo que necesitas es esto https://www.superprof.es/apuntes/escolar/matematicas/aritmetica/naturales/calculo-de-la-raiz-cuadrada.html .
Muchas gracias ...
- Sun Oct 22, 2017 4:40 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: funciones de FWH y Harbour en un archivo .txt
- Replies: 7
- Views: 6961
Re: funciones de FWH y Harbour en un archivo .txt
... cNull
Sign(<nNumber>)->nSign
Sin(<nAngle>)->nSine
SinH(<nRadians>)->nHyperbolicSine
SoundEx(<cString>)->cSoundExString
Space(<nCount>)->cSpaces
SQrt(<nNumber>)->nRoot
Standard()->cNull
StoD([<cDate>])->dDate
StoT([<cDateTime>])->dDateTime
Str(<nNumber>,[<nLength>],[<nDecimals>],[lTrim])->cNumber ...
Sign(<nNumber>)->nSign
Sin(<nAngle>)->nSine
SinH(<nRadians>)->nHyperbolicSine
SoundEx(<cString>)->cSoundExString
Space(<nCount>)->cSpaces
SQrt(<nNumber>)->nRoot
Standard()->cNull
StoD([<cDate>])->dDate
StoT([<cDateTime>])->dDateTime
Str(<nNumber>,[<nLength>],[<nDecimals>],[lTrim])->cNumber ...
- Sat Oct 21, 2017 8:44 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: funciones de FWH y Harbour en un archivo .txt
- Replies: 7
- Views: 6961
Re: funciones de FWH y Harbour en un archivo .txt
... cNull
Sign(<nNumber>)->nSign
Sin(<nAngle>)->nSine
SinH(<nRadians>)->nHyperbolicSine
SoundEx(<cString>)->cSoundExString
Space(<nCount>)->cSpaces
SQrt(<nNumber>)->nRoot
Standard()->cNull
StoD([<cDate>])->dDate
StoT([<cDateTime>])->dDateTime
Str(<nNumber>,[<nLength>],[<nDecimals>],[lTrim])->cNumber ...
Sign(<nNumber>)->nSign
Sin(<nAngle>)->nSine
SinH(<nRadians>)->nHyperbolicSine
SoundEx(<cString>)->cSoundExString
Space(<nCount>)->cSpaces
SQrt(<nNumber>)->nRoot
Standard()->cNull
StoD([<cDate>])->dDate
StoT([<cDateTime>])->dDateTime
Str(<nNumber>,[<nLength>],[<nDecimals>],[lTrim])->cNumber ...
- Sat Oct 21, 2017 8:43 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: funciones de FWH y Harbour en un archivo .txt
- Replies: 7
- Views: 6961
Re: funciones de FWH y Harbour en un archivo .txt
... SetLastError
SetLastKey
SetMode
SetMouse
SetNewDate
SetNewTime
SetPos
SetPrc
SetPrec
SetRegistry
SetTime
ShowTime
Sign
Sin
SinH
SoundEx
Space
SQrt
Standard
StoD
StoT
Str
StrDel
StrDiff
StrFile
StrFormat
StringToLiteral
StrOccurs
StrPeek
StrPoke
StrScreen
StrSwap
StrToHex
StrTran
StrZero
Stuff ...
SetLastKey
SetMode
SetMouse
SetNewDate
SetNewTime
SetPos
SetPrc
SetPrec
SetRegistry
SetTime
ShowTime
Sign
Sin
SinH
SoundEx
Space
SQrt
Standard
StoD
StoT
Str
StrDel
StrDiff
StrFile
StrFormat
StringToLiteral
StrOccurs
StrPeek
StrPoke
StrScreen
StrSwap
StrToHex
StrTran
StrZero
Stuff ...
- Fri Sep 01, 2017 2:16 am
- Forum: FiveWin para Harbour/xHarbour
- Topic: Ayuda DLL
- Replies: 24
- Views: 8577
Re: Ayuda DLL
... LIB|initsymb
Error: Unresolved external '_HB_FUN_SPACE' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SQRT' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_STR' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB ...
Error: Unresolved external '_HB_FUN_SPACE' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SQRT' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_STR' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB ...
- Thu Aug 31, 2017 2:56 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Ayuda DLL
- Replies: 24
- Views: 8577
Re: Ayuda DLL
... LIB|initsymb
Error: Unresolved external '_HB_FUN_SPACE' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SQRT' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_STR' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB ...
Error: Unresolved external '_HB_FUN_SPACE' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SQRT' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_STR' referenced from P:\32BITS\XHARBOUR\LIB\VM.LIB ...
- Tue Dec 22, 2009 4:17 pm
- Forum: FiveLinux / FiveDroid (Android)
- Topic: Compilar en Ubuntu
- Replies: 19
- Views: 9605
Re: Compilar en Ubuntu
... lib/libhbrtl.a(math.o): In function `HB_FUN_LOG':
math.c:(.text+0x912): undefined reference to `log'
./lib/libhbrtl.a(math.o): In function `HB_FUN_SQRT':
math.c:(.text+0xa4a): undefined reference to `sqrt'
./lib/librddntx.a(dbfntx1.o): In function `hb_ntxSortNew':
dbfntx1.c:(.text+0xb6fc): undefined ...
math.c:(.text+0x912): undefined reference to `log'
./lib/libhbrtl.a(math.o): In function `HB_FUN_SQRT':
math.c:(.text+0xa4a): undefined reference to `sqrt'
./lib/librddntx.a(dbfntx1.o): In function `hb_ntxSortNew':
dbfntx1.c:(.text+0xb6fc): undefined ...
- Wed Oct 21, 2009 12:51 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: Error in GTWin.lib, Rtl.lib, Rdd.lib, Dbfntx.lib and Vm.lib
- Replies: 15
- Views: 4224
Error in GTWin.lib, Rtl.lib, Rdd.lib, Dbfntx.lib and Vm.lib
... LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SPACE' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SQRT' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_STR' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error ...
Error: Unresolved external '_HB_FUN_SPACE' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SQRT' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_STR' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error ...
- Tue Oct 20, 2009 10:32 pm
- Forum: All products support
- Topic: Erro na GTWIN.LIB ao compilar programas
- Replies: 1
- Views: 1390
Erro na GTWIN.LIB ao compilar programas
... LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SPACE' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SQRT' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_STR' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error ...
Error: Unresolved external '_HB_FUN_SPACE' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_SQRT' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error: Unresolved external '_HB_FUN_STR' referenced from C:\HARBOUR\LIB\VM.LIB|initsymb
Error ...
- Sat Feb 07, 2009 6:42 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Problema GPF
- Replies: 10
- Views: 2294
Re: Problema GPF
... Locato
Calco()
GA = LF-LE
IF Locato1 = Locato2
DX := 1
Else
N=SIN(BE)*SIN(BF)+COS(BE)*COS(BF)*COS(GA) && calcolo qrb
DX=INT(( - ATn(N/SQRT(1-N*N))+3.1415926/2)*F+.5)
Endif
RETURN Nil
*-----------------
FUNC Calco
oa=ASC(Substr(locato,1,1))
ob=ASC(Substr(locato,2,1))
oc=Substr(locato ...
Calco()
GA = LF-LE
IF Locato1 = Locato2
DX := 1
Else
N=SIN(BE)*SIN(BF)+COS(BE)*COS(BF)*COS(GA) && calcolo qrb
DX=INT(( - ATn(N/SQRT(1-N*N))+3.1415926/2)*F+.5)
Endif
RETURN Nil
*-----------------
FUNC Calco
oa=ASC(Substr(locato,1,1))
ob=ASC(Substr(locato,2,1))
oc=Substr(locato ...
- Thu Dec 18, 2008 5:45 pm
- Forum: FiveWin para CA-Clipper
- Topic: compilar con buildh el sample tutor01
- Replies: 4
- Views: 1722