python> How to write multiple lines> How to write in mnist_with_summaries.py> It seems that there is no need for line concatenation symbols

Operating environment


Ubuntu 14.04 LTS desktop amd64
GeForce GTX 750 Ti
ASRock Z170M Pro4S [Intel Z170chipset]
TensorFlow v0.11
cuDNN v5.1 for Linux
CUDA v7.5
Python 2.7.6
IPython 5.1.0 -- An enhanced Interactive Python.

In the past I wrote about line concatenation in several languages. http://qiita.com/7of9/items/021bb0fa9443c2efc44b

A framework for deep learning called TensorFlow? I found the following code in the code mnist_with_summaries.py.

  with tf.name_scope('train'):
    train_step = tf.train.AdamOptimizer(FLAGS.learning_rate).minimize(
        cross_entropy)

It seems that there is no need for line concatenation symbols.

In the case of concatenating character strings, it is introduced at the following link. [[Python] I want to write a string on multiple lines @ memlog](http://blog.taikomatsu.com/2008/10/08/python%E6%96%87%E5%AD%97%E5 % 88% 97% E3% 82% 92% E8% A4% 87% E6% 95% B0% E8% A1% 8C% E3% 81% AB% E5% 88% 86% E3% 81% 91% E3% 81 % A6% E6% 9B% B8% E3% 81% 8D% E3% 81% 9F% E3% 81% 84 / comment-page-1 /)

Confirm with ideone

http://ideone.com/n5Rim5

def func_print(var):
	print var

var = 3.14
func_print(var)
func_print(
	var)

It may be conditional on "for function arguments".

Recommended Posts

python> How to write multiple lines> How to write in mnist_with_summaries.py> It seems that there is no need for line concatenation symbols
How to write string concatenation in multiple lines in Python
How to write a string when there are multiple lines in python
python> Is it possible to make in-line comments?> It seems that it has to be on multiple lines
How to write type hints for variables that are assigned multiple times in one line
[Introduction to Udemy Python3 + Application] 37. Techniques for determining that there is no value
How to define multiple variables in a python for statement
How to judge that the cross key is input in Python3
There is no switch in python
How to write what to do when an application is first displayed in Qt for Python with Designer
[Introduction to Python] How to delete rows that meet multiple conditions in Pandas.DataFrame
How to use is and == in Python
How to write Ruby to_s in Python
Tips for those who are wondering how to use is and == in Python
Python virtual environment in 2021 ~ There is no reason not to use venv now ~
How to receive command line arguments in Python
It seems that unidic-lite is required in mecab-python3
How to use pip, a package management system that is indispensable for using Python
20th Offline Real-time How to Write Problems in Python
Python text reading for multiple lines and one line
How to run python in virtual space (for MacOS)
[Python] How to write a docstring that conforms to PEP8
How to retrieve multiple arrays using slice in python.
[Introduction to Python] How to write repetitive statements using for statements
Is it a problem to eliminate the need for analog human resources in the AI era?
What to do when there is no response due to Proxy setting in Python web scraping
How to turn the for statement when there are multiple values for one key in the dictionary
[VLC] How to deal with the problem that it is not in the foreground during playback
How to slice a block multiple array from a multiple array in Python
Processing of python3 that seems to be usable in paiza
[Python] How to write an if statement in one sentence.
A simple way to avoid multiple for loops in Python
How to specify Cache-Control for blob storage in Azure Storage in Python
How to write a test for processing that uses BigQuery
How to implement Python EXE for Windows in Docker container
How to write a metaclass that supports both python2 and python3
Since there is no description on how to build an environment for nnabla with Docker including GPU, I tried it myself Part 1