home scroll deno

AI learning blog December 2024

December 03, 2024

"A Gentle Introduction to the Bootstrap Method"

https://machinelearningmastery.com/a-gentle-introduction-to-the-bootstrap-method/

December 06, 2024

Class 7.1 is missing from the repository of Jeff Heaton, but this fork contains the missing file:

https://github.com/facugonz/pytorch_installing/blob/master/t81_558_class_07_1_gan_intro.ipynb

December 09, 2024

The code in section 6.2 contains the statement
import keras_preprocessing
Note that there is an underscore character in the name.

However, the command to install the package is
conda install -c conda-forge keras-preprocessing
Note that package has a hyphen in the name.

Make sure you are in the correct conda environment before installing, for example

conda activate jh_class

December 12, 2024

Using NVlink with dual 3090's and C++ code:

https://www.reddit.com/r/LocalLLaMA/comments/16ubkyq/comment/li7lpqk/
https://github.com/ggerganov/llama.cpp
The author of the reddit comment, tomz17 states that he made a modification to ggml_cuda.cu that enables utilization of NVlink, but is unaware whether the change has been incorporated in the latest version of llama.cpp.

December 18, 2024

The paperclips example in the lesson Part 6.2: Regression Convolutional Neural Networks
is also on Kaggle
https://www.kaggle.com/datasets/jeffheaton/count-the-paperclips
plus a few extras, for example the code for generating the training data
https://www.kaggle.com/code/jeffheaton/generate-paperclips

Jeff Heaton's examples use the ImageDataGenerator Class to prepare the image data.
However, In TensorFlow version 2.10, ImageDataGenerator is deprecated.
Instead, use tf.data going forward.
https://www.scaler.com/topics/keras/image-data-pipelines-in-keras/
This page contains an example with tf.data and the CIFAR-10 Dataset from the keras library.

December 21, 2024

Keras Image classification from scratch example:
https://keras.io/examples/vision/image_classification_from_scratch/
While running model.fit(), errors keep appearing
Corrupt JPEG data: 1153 extraneous bytes before marker 0xd9
Other users have experienced the same problem:

Corrupt files in the dogs_vs_cats dataset #2188
https://github.com/tensorflow/datasets/issues/2188

A user on Kaggle has created a project with a smaller subset of the dog/cat images:

https://www.kaggle.com/datasets/abhinavnayak/catsvdogs-transformed/data

December 28, 2024

Validation data used in model.fit function
The preparation before model training in the model.fit function includes a step where the available data are split into training data and verification data. In some examples up to chapter 6.2, the model.fit function is called with the training data, and afterwards the model.predict function is called in order to find the accuracy of the trained model.
A typical output shows a loss value:
10/10 [==============================] - 6s 486ms/step - loss: 1.0254

In other examples such as in chapter 3.4, the model.fit function is called with the train data as well as the validation data.
A typical output shows a loss value:
112/112 - 0s - loss: 1.1940 - val_loss: 1.1126

In the resnet example in chapter 6.3, the model.fit function is called with the train data as well as the validation data.
Here, a typical output shows a loss value as well as a validation loss value:
250/250 [==============================] - 70s 256ms/step - loss: 73.1411 - rmse: 8.5523 - val_loss: 701.4966 - val_rmse: 26.4858

Date


Follow Me

discord