Rahul Pandit.

5 Mar 2022

Connecting jupyter notebook with Android studio

General

Is it possible to connect jupyter notebook as machine learning model (Backend) with my android studio project? Is so, how can I do that?

Comments

Shilpa

5 Mar 2022

github

Yes, definitely it is possible,

Here are some steps:

Step 1: Import required libraries

import tensorflow as tf
import numpy as np
from tensorflow import keras,lite

Step 2: Create a dataset.

x = np.array([-1.0,0.0,1.0,2.0,3.0,4.0],dtype=float)
y = np.array([-3.0,-1.0,1.0,3.0,5.0,7.0],dtype=float)

Step 3: Train a model using Keras

model = keras.Sequential([keras.layers.Dense(units=1,input_shape=[1]),keras.layers.Dense(units=1,input_shape=[1])])
model.compile(optimizer=’sgd’,loss=’mean_squared_error’)

Refer to this thread for further information.

If you want to deploy your ML model for Android Devices, read this thread. Hope it will help!

© 2024 Copyrights reserved for web-brackets.com