[PYTHON] Play with Fathom

For some reason, I got the Fathom Neural Compute Stick [^ 4], so I tried running the tutorial.

What is Fathom

--It works just by plugging a USB calculator into a PC etc. [^ 3] ――It seems to be a substitute that makes inference at high speed [^ 1]. (Learning is impossible) --It works when written in TensorFlow. --Lower power consumption than GPU

environment

Execution procedure (Docker version)

Maybe it doesn't work even if you follow the tutorial, so you need to make some corrections.

There is code to try seq2seq in the Fathom tutorial [^ 2], but since the code needs to put the data in the place where root authority is required, the root user instead of the fathom user described in the tutorial procedure You need to log in and work with.

docker pull rdadolf/fathom
docker run -it --user root rdadolf/fathom

Sample execution of Seq2Seq

Since the file name of the data to be downloaded has changed, modify fathom / seq2seq / data_utils.py to the following.

- train_path = os.path.join(directory, "giga-fren.release2")
+ train_path = os.path.join(directory, "giga-fren.release2.fixed")

Execute the Seq2Seq sample with the following command. It takes about an hour to download the WMT'15 data required to run Seq2Seq in the first tutorial, so wait. (There is no progress bar, but it is working.)

cd fathom/
mkdir -p /data/WMT15
python fathom/seq2seq/seq2seq.py 

Summary

--Used to speed up image recognition processing for drones, Raspberry Pi, surveillance cameras, etc. --Since there is about 50GB of free space, it can also be used as a USB memory. ――If you don't understand, you can ask in the forum [^ 5].

References

Recommended Posts

Play with Fathom
Play with Prophet
Play with PyTorch
Play with 2016-Python
Play with Pyramid
Play with Othello (Reversi)
Let's play with 4D 4th
Let's play with Amedas data-Part 1
Play with reinforcement learning with MuZero
Play with push notifications with imap4lib
Play around with Linux partitions
Let's play with Amedas data-Part 4
Play RocketChat with API / Python
Let's play with Amedas data-Part 2
Play with ASE MD module
Play with A3RT (Text Suggest)
Play with numerical calculation of magnetohydrodynamics
Play with a turtle with turtle graphics (Part 1)
Play with Poincare series and SymPy
Play with Pythonista UI implementation [Action implementation]
Play with PIR sensor module [DSUN-PIR]
Play with demons because it's setsubun
Play video with sound with python !! (tkinter / imageio)
[Introduction to WordCloud] Let's play with scraping ♬
Play audio files from Python with interrupts
Play like a web app with ipywidgets
Play around with the pythonista3 ui module
I want to play with aws with python
Play with Pythonista UI implementation [Screen elements]
Play with MoleculeNet's PDBBind and DeepChem's RDKitGridFeaturizer
Play audio files with interrupts using PyAudio
Play with puns using the COTOHA API
Load csv with pandas and play with Index
Python hand play (let's get started with AtCoder?)
[REAPER] How to play with Reascript in Python
Play with Google Spread Sheets in python (OAuth)
[Piyopiyokai # 1] Let's play with Lambda: Creating a Lambda function
Play with Lambda layer (python) for about 5 minutes
I wanted to play with the Bezier curve
Understand grid points and play with contour lines.
Play with your Ubuntu desktop on your Raspberry Pi 4