@@ -320,6 +320,65 @@ Release Date: 6 August 2020
320
320
321
321
.. _header-n124 :
322
322
323
+ PyGAD 2.7.0
324
+ -----------
325
+
326
+ Changes in PyGAD 2.7.0 (11 September 2020):
327
+
328
+ 1. The ``learning_rate `` parameter in the ``pygad.nn.train() `` function
329
+ defaults to **0.01 **.
330
+
331
+ 2. Added support of building neural networks for regression using the
332
+ new parameter named ``problem_type ``. It is added as a parameter to
333
+ both ``pygad.nn.train() `` and ``pygad.nn.predict() `` functions. The
334
+ value of this parameter can be either **classification ** or
335
+ **regression ** to define the problem type. It defaults to
336
+ **classification **.
337
+
338
+ 3. The activation function for a layer can be set to the string
339
+ ``"None" `` to refer that there is no activation function at this
340
+ layer. As a result, the supported values for the activation function
341
+ are ``"sigmoid" ``, ``"relu" ``, ``"softmax" ``, and ``"None" ``.
342
+
343
+ To build a regression network using the ``pygad.nn `` module, just do the
344
+ following:
345
+
346
+ 1. Set the ``problem_type `` parameter in the ``pygad.nn.train() `` and
347
+ ``pygad.nn.predict() `` functions to the string ``"regression" ``.
348
+
349
+ 2. Set the activation function for the output layer to the string
350
+ ``"None" ``. This sets no limits on the range of the outputs as it
351
+ will be from ``-infinity `` to ``+infinity ``. If you are sure that all
352
+ outputs will be nonnegative values, then use the ReLU function.
353
+
354
+ Check the documentation of the ``pygad.nn `` module for an example that
355
+ builds a neural network for regression. The regression example is also
356
+ available at `this GitHub
357
+ project <https://github.com/ahmedfgad/NumPyANN> `__:
358
+ https://github.com/ahmedfgad/NumPyANN
359
+
360
+ To build and train a regression network using the ``pygad.gann `` module,
361
+ do the following:
362
+
363
+ 1. Set the ``problem_type `` parameter in the ``pygad.nn.train() `` and
364
+ ``pygad.nn.predict() `` functions to the string ``"regression" ``.
365
+
366
+ 2. Set the ``output_activation `` parameter in the constructor of the
367
+ ``pygad.gann.GANN `` class to ``"None" ``.
368
+
369
+ Check the documentation of the ``pygad.gann `` module for an example that
370
+ builds and trains a neural network for regression. The regression
371
+ example is also available at `this GitHub
372
+ project <https://github.com/ahmedfgad/NeuralGenetic> `__:
373
+ https://github.com/ahmedfgad/NeuralGenetic
374
+
375
+ To build a classification network, either ignore the ``problem_type ``
376
+ parameter or set it to ``"classification" `` (default value). In this
377
+ case, the activation function of the last layer can be set to any type
378
+ (e.g. softmax).
379
+
380
+ .. _header-n148 :
381
+
323
382
PyGAD Projects at GitHub
324
383
========================
325
384
@@ -328,7 +387,7 @@ https://pypi.org/project/pygad. PyGAD is built out of a number of
328
387
open-source GitHub projects. A brief note about these projects is given
329
388
in the next subsections.
330
389
331
- .. _header-n126 :
390
+ .. _header-n150 :
332
391
333
392
`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython >`__
334
393
--------------------------------------------------------------------------------
@@ -339,7 +398,7 @@ GitHub Link: https://github.com/ahmedfgad/GeneticAlgorithmPython
339
398
is the first project which is an open-source Python 3 project for
340
399
implementing the genetic algorithm based on NumPy.
341
400
342
- .. _header-n129 :
401
+ .. _header-n153 :
343
402
344
403
`NumPyANN <https://github.com/ahmedfgad/NumPyANN >`__
345
404
----------------------------------------------------
@@ -353,7 +412,7 @@ neural network without using a training algorithm. Currently, it only
353
412
supports classification and later regression will be also supported.
354
413
Moreover, only one class is supported per sample.
355
414
356
- .. _header-n132 :
415
+ .. _header-n156 :
357
416
358
417
`NeuralGenetic <https://github.com/ahmedfgad/NeuralGenetic >`__
359
418
--------------------------------------------------------------
@@ -366,7 +425,7 @@ projects
366
425
`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython >`__
367
426
and `NumPyANN <https://github.com/ahmedfgad/NumPyANN >`__.
368
427
369
- .. _header-n135 :
428
+ .. _header-n159 :
370
429
371
430
`NumPyCNN <https://github.com/ahmedfgad/NumPyCNN >`__
372
431
----------------------------------------------------
@@ -378,7 +437,7 @@ convolutional neural networks using NumPy. The purpose of this project
378
437
is to only implement the **forward pass ** of a convolutional neural
379
438
network without using a training algorithm.
380
439
381
- .. _header-n138 :
440
+ .. _header-n162 :
382
441
383
442
`CNNGenetic <https://github.com/ahmedfgad/CNNGenetic >`__
384
443
--------------------------------------------------------
@@ -390,7 +449,7 @@ convolutional neural networks using the genetic algorithm. It uses the
390
449
`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython >`__
391
450
project for building the genetic algorithm.
392
451
393
- .. _header-n141 :
452
+ .. _header-n165 :
394
453
395
454
Submitting Issues
396
455
=================
@@ -407,7 +466,7 @@ is not working properly or to ask for questions.
407
466
If this is not a proper option for you, then check the **Contact Us **
408
467
section for more contact details.
409
468
410
- .. _header-n145 :
469
+ .. _header-n169 :
411
470
412
471
Ask for Feature
413
472
===============
@@ -424,7 +483,7 @@ to ahmed.f.gad@gmail.com.
424
483
425
484
Also check the **Contact Us ** section for more contact details.
426
485
427
- .. _header-n149 :
486
+ .. _header-n173 :
428
487
429
488
Projects Built using PyGAD
430
489
==========================
@@ -443,15 +502,15 @@ Within your message, please send the following details:
443
502
444
503
- Preferably, a link that directs the readers to your project
445
504
446
- .. _header-n160 :
505
+ .. _header-n184 :
447
506
448
507
For More Information
449
508
====================
450
509
451
510
There are different resources that can be used to get started with the
452
511
genetic algorithm and building it in Python.
453
512
454
- .. _header-n162 :
513
+ .. _header-n186 :
455
514
456
515
Tutorial: Implementing Genetic Algorithm in Python
457
516
--------------------------------------------------
@@ -475,7 +534,7 @@ good resource to start with coding the genetic algorithm.
475
534
476
535
|image0 |
477
536
478
- .. _header-n173 :
537
+ .. _header-n197 :
479
538
480
539
Tutorial: Introduction to Genetic Algorithm
481
540
-------------------------------------------
@@ -494,7 +553,7 @@ which is available at these links:
494
553
495
554
|image1 |
496
555
497
- .. _header-n183 :
556
+ .. _header-n207 :
498
557
499
558
Tutorial: Build Neural Networks in Python
500
559
-----------------------------------------
@@ -514,7 +573,7 @@ available at these links:
514
573
515
574
|image2 |
516
575
517
- .. _header-n193 :
576
+ .. _header-n217 :
518
577
519
578
Tutorial: Optimize Neural Networks with Genetic Algorithm
520
579
---------------------------------------------------------
@@ -534,7 +593,7 @@ available at these links:
534
593
535
594
|image3 |
536
595
537
- .. _header-n203 :
596
+ .. _header-n227 :
538
597
539
598
Tutorial: Building CNN in Python
540
599
--------------------------------
@@ -560,7 +619,7 @@ good resource to start with coding CNNs.
560
619
561
620
|image4 |
562
621
563
- .. _header-n216 :
622
+ .. _header-n240 :
564
623
565
624
Tutorial: Derivation of CNN from FCNN
566
625
-------------------------------------
@@ -579,7 +638,7 @@ which is available at these links:
579
638
580
639
|image5 |
581
640
582
- .. _header-n226 :
641
+ .. _header-n250 :
583
642
584
643
Book: Practical Computer Vision Applications Using Deep Learning with CNNs
585
644
--------------------------------------------------------------------------
@@ -605,7 +664,7 @@ Find the book at these links:
605
664
.. figure :: https://user-images.githubusercontent.com/16560492/78830077-ae7c2800-79e7-11ea-980b-53b6bd879eeb.jpg
606
665
:alt:
607
666
608
- .. _header-n241 :
667
+ .. _header-n265 :
609
668
610
669
Contact Us
611
670
==========
0 commit comments