Bonsoir,
je suis en train d'apprendre à utiliser tensorflow. Je veux ecrire dans un fichier avec tensorflow
donc je fait
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import tensorflow as tf
 
#Simple hello world using TensorFlow                                                                                                                                                                         
 
# Create a Constant op                                                                                                                                                                                       
# The op is added as a node to the default graph.                                                                                                                                                            
#                                                                                                                                                                                                            
# The value returned by the constructor represents the output                                                                                                                                                
# of the Constant op.                                                                                                                                                                                        
hello = tf.constant('Hello, TensorFlow!')
t = tf.read_file("e.txt", "Name")
# Start tf session                                                                                                                                                                                           
sess = tf.Session()
tf.python_io.TFRecordWriter.__init__("path")
tf.python_io.TFRecordWriter.write("record")
print sess.run(hello)
print sess.run(t)
le prototype est:
tf.python_io.TFRecordWriter.__init__(path)
il m'affiche TypeError: unbound method __init__() must be called with TFRecordWriter instance as first argument (got str instance instead).
Je ne comprends pas ce qu'il veut.
Cordialement.