provo ad eseguire i seguenti codici sulla Spyder (Python 2.7.11):% magica linea matplotlib provoca SyntaxError nello script Python
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
%matplotlib inline
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import tensorflow as tf
# settings
LEARNING_RATE = 1e-4
# set to 20000 on local environment to get 0.99 accuracy
TRAINING_ITERATIONS = 2000
DROPOUT = 0.5
BATCH_SIZE = 50
# set to 0 to train on all available data
VALIDATION_SIZE = 2000
# image number to output
IMAGE_TO_DISPLAY = 10
ma ho ottenuto questo errore:
line 10
%matplotlib inline
^
SyntaxError: invalid syntax.
Apprezzo se qualcuno mi dà una spiegazione
P.S. il codice proviene dal progetto di concorrenza di Kaggle: Digit Recognizer
Avete mai installato altre distribuzioni scientifiche? https://github.com/ContinuumIO/anaconda-issues/issues/264 – GLaDOS
Sto usando Anaconda per Python 2.7.11, installato panda, nump, scipy, matplotlib, scikit-learn 0.17. .... – John
anche theano 0.8.0.dev0 – John