0
0 Комментариев

Код:

with tf.Session() as sess:
    sess.run(initialize_all_variables())
 
    for epoch in hm_epochs:
        epoch_loss=0
        for _ in range(int (mnist.train.num_examples/b_s)):
            x,y=mnist.train.next_batch(b_s)
            _,c=sess.run([optimizer,cost]), feed_dict = {x: x, y: y})
            epoch_loss+=c
        print('Epoch : ',epoch,'   complited',hm_epochs,'   loss:' ,epoch_loss)

Output:

File "C:\Users\neir0\Desktop\py.projects\test_eny_code.py", line 65
sess.run(initialize_all_variables())
   ^IndentationError: expected an indented block
[Finished in 0.142s]

Как убрать ошибку?


Добавить комментарий