Recent

Author Topic: Conscious Artificial Intelligence - Project Update  (Read 27954 times)

schuler

  • Full Member
  • ***
  • Posts: 182
Re: Conscious Artificial Intelligence - Project Update
« Reply #105 on: October 15, 2020, 11:08:46 am »
Some of my own models have millions of trainable parameters with 224x224x3 (150k) inputs. So, input size isn't a limit.

daringly

  • Jr. Member
  • **
  • Posts: 54
Re: Conscious Artificial Intelligence - Project Update
« Reply #106 on: October 21, 2020, 07:35:33 pm »
I figured out the error, thanks. I was doing something idiotic.

schuler

  • Full Member
  • ***
  • Posts: 182
Re: Conscious Artificial Intelligence - Project Update
« Reply #107 on: October 22, 2020, 07:42:42 pm »
Cool.

In the case that you are interested, I coded a new Hypotenuse Example without preallocating all the training data into memory. This is useful if you have a too large dataset to fit into memory (I've seen training datasets approaching 1TB).

https://github.com/joaopauloschuler/neural-api/blob/master/examples/HypotenuseFitLoading/HypotenuseFitLoading.lpr

:) Wish everyone happy pascal coding :)

nouzi

  • Full Member
  • ***
  • Posts: 188
Re: Conscious Artificial Intelligence - Project Update
« Reply #108 on: October 22, 2020, 08:04:14 pm »
Very nice  8-)
my english is  bad
Lazarus 2.0.6 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : linux mint 19.3 64bit  windows 7 64bit

schuler

  • Full Member
  • ***
  • Posts: 182
Re: Conscious Artificial Intelligence - Project Update
« Reply #109 on: December 03, 2020, 01:02:18 am »
@nouzi, thank you for your kind words.

I have 2 news:
  • A new layer type: TNNetConvolutionSharedWeights.
  • Beautiful images created by a neural network.

Beautiful Images
I've attached some images created by a generative adversarial network. The source code can be found here:
https://sourceforge.net/p/cai/svncode/1485/tree/trunk/lazarus/examples/VisualGANTinyImagenet/

TNNetConvolutionSharedWeights
Added today to the API a new convolutional layer type: TNNetConvolutionSharedWeights . Instead of having its own neurons and weights, this convolutional layer uses the same neurons and weights from another existing layer. So, if you need 2 layers with the same neurons, you can add TNNetConvolutionSharedWeights to your network. Why would you need something like this? Maybe, your NN needs to learn the same patterns in different scales (such as big and small dogs are all dogs).

I added an example at:
https://github.com/joaopauloschuler/neural-api/blob/master/examples/SimpleImageClassifier/SimpleImageClassifierSharedWeights.lpr

:) wish everyone happy pascal coding :)

PierceNg

  • Jr. Member
  • **
  • Posts: 72
Re: Conscious Artificial Intelligence - Project Update
« Reply #110 on: January 31, 2021, 08:56:51 am »
@schuler This is great stuff! Thanks for making this!

My setup: Windows 10 Home 2H20, Ryzen 2500U, latest AMD drivers, Lazarus 2.0.10 with FPC 3.2.0.  GPU probe shows following:

Platform info: 0 ---------------------
PROFILE: FULL_PROFILE
VERSION: OpenCL 2.1 AMD-APP (3188.4)
NAME: AMD Accelerated Parallel Processing
VENDOR: Advanced Micro Devices, Inc.
EXTENSIONS: cl_khr_icd cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_amd_event_callback cl_amd_offline_devices
<and so on>


However, when running, say, opencl-dot-product-test.exe, I get many lines of the following:

Error: TDotProductCL.Compute - Failed setting parameters: -48

I am not familiar with OpenCL programming. Is -48 the OpenCL error CL_INVALID_KERNEL? More importantly, does the error mean the GPU wasn't used?

schuler

  • Full Member
  • ***
  • Posts: 182
Re: Conscious Artificial Intelligence - Project Update
« Reply #111 on: February 06, 2021, 06:49:48 pm »
Hi PierceNg,
Do you have any of the following messages?

Code: Pascal  [Select][+][-]
  1. clCreateContext OK!
  2. clCreateCommandQueue OK!
  3. clCreateProgramWithSource OK!
  4. clBuildProgram OK!
  5. clCreateKernel cai_dot_product OK!
  6. clCreateKernel cai_dot_product OK!

I'm wondering if the file cai_dot_product.cl is correctly been loaded.

I logged a bug report for this:
https://github.com/joaopauloschuler/neural-api/issues/41

Can you please confirm if you are using an APU or a discrete video card? In the case of a discrete video card, what is the model?
« Last Edit: February 07, 2021, 12:04:21 pm by schuler »

schuler

  • Full Member
  • ***
  • Posts: 182
Re: Conscious Artificial Intelligence - Project Update
« Reply #112 on: February 07, 2021, 06:53:04 pm »
@PierceNg,
I've just tested with a Ryzen APU and was able to reproduce the problem and fix it:
https://github.com/joaopauloschuler/neural-api/issues/41

 :) Wish everyone happy pascal coding  :)

PierceNg

  • Jr. Member
  • **
  • Posts: 72
Re: Conscious Artificial Intelligence - Project Update
« Reply #113 on: February 08, 2021, 11:03:33 am »
@PierceNg,
I've just tested with a Ryzen APU and was able to reproduce the problem and fix it:
https://github.com/joaopauloschuler/neural-api/issues/41

 :) Wish everyone happy pascal coding  :)

Thank you!

After pulling from your repos,the dot product and visual CIFAR 10 OpenCL versions run, and I see the "OK!" messages in the command prompt window. My machine is using a Ryzen APU.

mika

  • New Member
  • *
  • Posts: 24
Re: Conscious Artificial Intelligence - Project Update
« Reply #114 on: February 11, 2021, 06:46:54 pm »
HypotenuseFitLoading.lpr
Code: Pascal  [Select][+][-]
  1.     Write('Press ENTER to exit.');
  2.     ReadLn;
  3.   end;
  4.  

should be

Code: Pascal  [Select][+][-]
  1.     Write('Press ENTER to exit.');
  2.     ReadLn;
  3.     Terminate;
  4.   end;
  5.  
Otherwise it keeps repeating DoRun method over and over.

schuler

  • Full Member
  • ***
  • Posts: 182
Re: Conscious Artificial Intelligence - Project Update
« Reply #115 on: February 14, 2021, 07:49:28 pm »
@mika,
the bug has been fixed as per your suggestion (thank you!):
https://github.com/joaopauloschuler/neural-api/issues/42

 

TinyPortal © 2005-2018