我的会话运行如下。
while batch_number < args.epoch_size:
start_time = time.time()
feed_dict = {
learning_rate_placeholder: lr,
phase_train_placeholder : True,
batch_size_placeholder : args.batch_size}
if (batch_number % 100 == 0):
err, _, step, reg_loss, summary_str = sess.run(
[loss, train_op, global_step, regularization_losses, summary_op], feed_dict=feed_dict)
summary_writer.add_summary(summary_str, global_step=step)
else:
err, _, step, reg_loss = sess.run([loss, train_op, global_step, regularization_losses], feed_dict=feed_dict)
duration = time.time() - start_time
出现以下错误,
TypeError:获取参数None的类型无效
错误在执行sess.run
的行中发生。我可以知道为什么吗?有什么解决办法吗?