Exemplo n.º 1
0
 /**
  * @dataProvider dataProviderForSoftmax
  */
 public function testSoftmax(array $𝐳, array $expected)
 {
     $σ⟮𝐳⟯ⱼ = Special::softmax($𝐳);
     $this->assertEquals($expected, $σ⟮𝐳⟯ⱼ, '', 1.0E-5);
     $this->assertEquals(1, array_sum($σ⟮𝐳⟯ⱼ));
 }