@@ -9,6 +9,34 @@ gap> Assert( 0, Para.SoftmaxCrossEntropyLoss_( 3 ) = Para.SoftmaxCrossEntropyLos
9
9
gap> Assert ( 0 , Para.QuadraticLoss_( 3 ) = Para.QuadraticLoss( 3 ) );
10
10
gap> Assert ( 0 , Para.SigmoidBinaryCrossEntropyLoss_( 1 ) = Para.SigmoidBinaryCrossEntropyLoss( 1 ) );
11
11
gap> Assert ( 0 , Para.AffineTransformation_( 3 , 4 ) = Para.AffineTransformation( 3 , 4 ) );
12
+ gap> l := Para.AffineTransformation( 3 , 4 );
13
+ ℝ^ 3 -> ℝ^ 4 defined by:
14
+
15
+ Parameter Object:
16
+ -----------------
17
+ ℝ^ 16
18
+
19
+ Parametrised Morphism:
20
+ ----------------------
21
+ ℝ^ 19 -> ℝ^ 4
22
+ gap> dummy_input := DummyInputForAffineTransformation( 3 , 4 , " w" , " b" , " x" );;
23
+ gap> Display( l : dummy_input := dummy_input );
24
+ ℝ^ 3 -> ℝ^ 4 defined by:
25
+
26
+ Parameter Object:
27
+ -----------------
28
+ ℝ^ 16
29
+
30
+ Parametrised Morphism:
31
+ ----------------------
32
+ ℝ^ 19 -> ℝ^ 4
33
+
34
+ ‣ w1_1 * x1 + w2_1 * x2 + w3_1 * x3 + b_1
35
+ ‣ w1_2 * x1 + w2_2 * x2 + w3_2 * x3 + b_2
36
+ ‣ w1_3 * x1 + w2_3 * x2 + w3_3 * x3 + b_3
37
+ ‣ w1_4 * x1 + w2_4 * x2 + w3_4 * x3 + b_4
38
+ gap> LaTeXOutput( UnderlyingMorphism( l ) : dummy_input := dummy_input );
39
+ " \\ begin{array}{c}\n\\ mathbb{R}^{19}\\ rightarrow\\ mathbb{R}^{4}\\\\ \n \\ hline \\\\ \n \\ left( \\ begin{array}{l}\n b_{1} + w_{1 1} x_{1} + w_{2 1} x_{2} + w_{3 1} x_{3} \\\\ \n b_{2} + w_{1 2} x_{1} + w_{2 2} x_{2} + w_{3 2} x_{3} \\\\ \n b_{3} + w_{1 3} x_{1} + w_{2 3} x_{2} + w_{3 3} x_{3} \\\\ \n b_{4} + w_{1 4} x_{1} + w_{2 4} x_{2} + w_{3 4} x_{3}\n\\ end{array} \\ right)\\\\ \n \\\\ \n \\ hline \\\\ \n \\ left( \\ begin{array}{lllllllllllllllllll}\n x_{1} & x_{2} & x_{3} & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & w_{1 1} & w_{2 1} & w_{3 1} \\\\ \n 0 & 0 & 0 & 0 & x_{1} & x_{2} & x_{3} & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & w_{1 2} & w_{2 2} & w_{3 2} \\\\ \n 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & x_{1} & x_{2} & x_{3} & 1 & 0 & 0 & 0 & 0 & w_{1 3} & w_{2 3} & w_{3 3} \\\\ \n 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & x_{1} & x_{2} & x_{3} & 1 & w_{1 4} & w_{2 4} & w_{3 4}\n\\ end{array} \\ right)\n\\ end{array}"
12
40
gap> Eval( Smooth.PolynomialTransformation( 2 , 3 , 4 ), [ 1 .. 47 ] );
13
41
[ 122341573 , 479204128 , 836066683 ]
14
42
gap> EvalJacobianMatrix( Smooth.PolynomialTransformation( 2 , 3 , 4 ), [ 1 .. 47 ] );
0 commit comments