Tag: tensorflow

Uncategorized

Boston Housing Data Analysis

API
https://www.tensorflow.org/api_docs/python/tf/keras/datasets/boston_housing/load_data

Samples contain 13 attributes of houses at different locations around the Boston suburbs in the late 1970s. Targets are the median values of the houses at a location (in k$).

http://lib.stat.cmu.edu/datasets/boston

404×13 = 5252

y_train x_train 404 samples
y_test x_test 102 samples
x 13
y 1 target scalar

y_train, y_test: numpy arrays of shape (num_samples,) containing the target scalars. The targets are float scalars typically between 10 and 50 that represent the home prices in k$.

Uncategorized

conda jupyter tensorflow

found on #stackoverflow
https://stackoverflow.com/a/43259471/1650038

Create a virtual environment - conda create -n tensorflowx

  • conda activate tensorflowx

So then the next thing, when you launch it:

  1. If you are not inside the virtual environment type - Source Activate Tensorflow
  2. Then inside this again install your Jupiter notebook and Pandas libraries, because there can be some missing in this virtual environment

Inside the virtual environment just type:

  1. pip install jupyter notebook
  2. pip install pandas

Then you can launch jupyter notebook saying:

  1. jupyter notebook
  2. Select the correct terminal python 3 or 2
  3. Then import those modules

! start jupy from project folder in Documents

.py files

git init
add commit
git remote add origin  <REMOTE_URL> 
git push remot origin

conda jupyter tensorflow: github condjup is local xfold repo
vs code debug tensorflo: repo deepflo
docker tensorflow image: once again:
docker run -it --rm -v $(realpath ~/notebooks):/tf/notebooks -p 8888:8888 tensorflow/tensorflow:latest-jupyter
https://codeflysurf.com/2021/11/22/running-tensorflow-in-jupyter-notebook-docker/

Uncategorized

tensorflow pipenv keras

https://github.com/flowxcode/deepflow
https://pipenv.pypa.io/en/latest/
https://pipenv.pypa.io/en/latest/install/

$ pipenv run python main.py

$ pipenv shell

https://stackoverflow.com/a/68673872/1650038

settings.json to pipvenv in home .local

"python.pythonPath": "${env:HOME}/.local/share/virtualenvs/deepflow-eho_wYiM/bin/python"

launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            //"program": "/home/linx/.local/share/virtualenvs/deepflow-eho_wYiM/<program>",
        }
    ]
}

test x format

import tensorflow as tf
print("TensorFlow version:", tf.__version__)