python


Tensorflow CPU (normal in python interactive shell, but coredump when run script)


I'm trying to learn Tensorflow on Single CPU mode. When I try to run some examples , such as [mnist_softmax.py] it seems that the whole code run correctly and output the expected answer, but shows [Segmentation fault (core dumped)] and generate a 1.7G or even bigger core file in the end.
When I run the same code in python interactive shell, it runs well and won't appear such Segmentation fault.
And my Tensorflow version is ('v1.0.0-65-g4763edf-dirty', '1.0.1')
Change line 61 from sess = tf.InteractiveSession()
to sess = tf.Session()
and rerun it on the command line.
replace from line 61 to 72 with this
with tf.Session() as sess:
tf.global_variables_initializer().run()
# Train
for _ in range(1000):
batch_xs, batch_ys = mnist.train.next_batch(100)
sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys})
# Test trained model
correct_prediction = tf.equal(tf.argmax(y, 1), tf.argmax(y_, 1))
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
print(sess.run(accuracy, feed_dict={x: mnist.test.images,
y_: mnist.test.labels}))

Related Links

Trouble setting up selenium with python3(linux)
Python : ask the number of common word you want
Azure Cognitive text analytics Tool returns 400 Bad request Python
How to sort a list of list of characters by sorted index of inner list?
always serializer is invalid
How do I flatten a hierarchical column index in a pandas DataFrame?
Why does 'while' cause the program to run longer in Python
QuerySet to JSON with nested objects
Python: How to populate Pandas column that depends on the previous value (previous row)?
Error with the open() function in python [closed]
Fine tuning pretrained model in keras
Getting the derivatives of Legendre polynomials in Python
Most recommended/used library for desiging POM code (Python)
how can I add dictionaries in dictionary
Too many to unpack tuple NLTK Chat
CNTK Python how to pass multiple features into model

Categories

HOME
arrays
makefile
ajax
warnings
wildcard
backup
angular2-routing
qpython3
actionscript
docker-swarm
search-engine
heap-memory
structuremap
unity2d
click
flexbox
hosts
cartodb
wordpress-theming
cpanel
medium-editor
ada
flexlm
jni
excel-2010
google-ima
url.action
cocoa-touch
printdocument
croppic
branch
image-quality
upnp
classpath
pentaho-report-designer
pcre
superagent
xor
getjson
postgresql-9.2
backup-strategies
polymorphism
service-locator
windows-10-iot-core
pace
nodeclipse
magiczoomplus
deepstream.io
delphi-10.1-berlin
s3cmd
stereo-3d
z3py
filepath
archer
lumen-5.3
vcf
ti-basic
sapui
persistent
slidesjs
pluck
rpostgresql
photography
visual-studio-templates
build-process
atlassian-crowd
iostat
rstudio-server
spring-lemon
group-concat
yoothemes
intellitest
insert-into
site-prism
evo
mptcp
wif
pylearn
apache-mina
uos
adodb
java-melody
qtestlib
funq
ssms-addin
codeigniter-a3m
pic24
resource-files
visual-c++-2010-express
bsod
arangodb-php
fogbugz-api
jqmobi
gridworld
localtime
argb
git-filter-branch
tfs-power-tools
gdt
z-machine
visual-web-gui
nemerle
executable-format
paintcomponent
audiostreamer
kpi
method-signature
castle-validators

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App