0
votes
for j in range(10):
    for i in range(0, 20000, conf.batch_size):
        x1 = Xtrain[0][i:i + conf.batch_size]
        x2 = Xtrain[1][i:i + conf.batch_size]
        y = ytrain[i:i + conf.batch_size]
        _, summaries, accc, loss = sess.run([train_step, train_summary_op, acc, cost],
                feed_dict={input_1: x1, input_2: x2, input_3: y, dropout_keep_prob: 1.0})
        time_str = datetime.datetime.now().isoformat()
        print("{}: loss {:g}, acc {:g}".format(time_str, loss, accc))
        train_summary_writer.add_summary(summaries)
    print("\nEvaluation:")
    accc = sess.run(acc, feed_dict={input_1: Xtest[0], input_2: Xtest[1], input_3: ytest, dropout_keep_prob: 1.0})
    print("test accuracy:", accc)

Error:

Traceback (most recent call last): File "F:/python_workspace/intel/MPCNN/train.py", line 124, in feed_dict={input_1: x1, input_2: x2, input_3: y, dropout_keep_prob: 1.0}) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\debug\wrappers\framework.py", line 411, in run self._run_call_count)) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\debug\wrappers\local_cli_wrapper.py", line 212, in on_run_start self._run_start_response = self._launch_cli() File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\debug\wrappers\local_cli_wrapper.py", line 366, in _launch_cli title_color=self._title_color) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\debug\cli\curses_ui.py", line 460, in run_ui self._dispatch_command(init_command) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\debug\cli\curses_ui.py", line 699, in _dispatch_com mand self._display_output(screen_output) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\debug\cli\curses_ui.py", line 1044, in _display_out put self._scroll_output(_SCROLL_HOME) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\debug\cli\curses_ui.py", line 1282, in _scroll_outp ut self._screen_render_nav_bar() File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\debug\cli\curses_ui.py", line 1295, in _screen_rend er_nav_bar self._max_x) _curses.error: prefresh() returned ERR

I don't know how to deal with it,please help me.

2

2 Answers

0
votes

In the code you provide, the expression:

feed_dict={input_1: Xtest[0], input_2: Xtest[1], input_3: ytest, dropout_keep_prob: 1.0})

generates an error somewhere inside Anaconda3.

Find out what anaconda3 expects. Then check what it is that you are giving anaconda3. If everything is as could be expected, then try googling for the error ("_curses.error: prefresh() returned ERR"). Chanses are you are not the first person who has encountered this problem.

0
votes

I don't know if it's the same thing, but for me the error was because Curses was trying to output beyond the range of the terminal window. By expanding my window, I no longer had the error. Now for the other errors....