# Setup python environment

※ This post is mainly just a summary/translation of the Japanese blog, データサイエンティストを目指す人のpython環境構築 2016   TL;DR; I recommend to install “anaconda” instead of using “official python package”.   If you just want to proceed environment setup, jump to “Environment setup for each OS”. At first, I will explain little bit about the background knowledge of python & anaconda.  Python version Python version 2 and 3 are distributed, current latest version is python 2.7 and python 3.6. Several years ago, it is said that “some library is still not compatible with python 3.x, and thus python 2.x is recommended”. However, now most of the popular library works well with […]

# Write predict code using concat_examples

This tutorial corresponds to 03_custom_dataset_mlp folder in the source code.   We have trained the model with own dataset, MyDataset, in previous post, let’s write predict code. Source code: predict_custom_dataset1.py predict_custom_dataset2.py   Prepare test data It is not difficult for the model to fit to the train data, so we will check how the model is fit to the test data.

I used the same seed (=13) to extract the train and test data used in the training phase.   Load trained model

The procedure to load the trained model is Instantiate the model (which is a subclass of Chain: here, it is MyMLP) Send the parameters to GPU if […]