> For the complete documentation index, see [llms.txt](https://undersleepers.gitbook.io/nico-marcelino-portfolio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://undersleepers.gitbook.io/nico-marcelino-portfolio/machine-learning-projects/rock-paper-scissors-classifier.md).

# Rock-Paper-Scissors Classifier

Rock-Paper-Scissors Classifier is a convolutional neural network (CNN) model that classifies images of hands. The CNN model detects whether the image given is of a "rock", "paper", or "scissors" hand shape. The model is written in Python using Tensorflow and Keras libraries.&#x20;

The dataset used is the Rock-Paper-Scissors dataset provided by Dicoding. After training and testing, the model has 96.48% accuracy and 96.58% validation accuracy. This model was compiled with the "categorical crossentropy" loss function, "Adamax" optimizer and uses accuracy as its metric.

{% hint style="info" %}
This project was an assignment for Dicoding's Machine Learning path.
{% endhint %}

```python
notebook-python
model = tf.keras.models.Sequential([
    tf.keras.layers.Conv2D(32, (3,3), activation='relu', input_shape=(150, 150, 3)),
    tf.keras.layers.MaxPooling2D(2, 2),
    tf.keras.layers.Conv2D(64, (3,3), activation='relu'),
    tf.keras.layers.MaxPooling2D(2,2),
    tf.keras.layers.Conv2D(128, (3,3), activation='relu'),
    tf.keras.layers.MaxPooling2D(2,2),
    tf.keras.layers.Conv2D(256, (3,3), activation='relu'),
    tf.keras.layers.MaxPooling2D(2,2),
    tf.keras.layers.Flatten(),
    tf.keras.layers.Dropout(0.5),
    tf.keras.layers.Dense(512, activation='relu'),
    tf.keras.layers.Dense(3, activation='softmax')
])
```

***

{% embed url="<https://colab.research.google.com/drive/1RvvDKHrYSWS1x9SThPpIb9hX8P_O_Em3?usp=sharing>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://undersleepers.gitbook.io/nico-marcelino-portfolio/machine-learning-projects/rock-paper-scissors-classifier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
