INNER CODE UNIT · Python
avg_loss
deepchem/deepchem · contrib/tensorflow_models/__init__.py:381
avg_loss = float(avg_loss) / index_in_epoch
log('Ending epoch %d: Average loss %g' % (epoch, avg_loss),
self.verbose)
epoch += 1
index_in_epoch = 0
avg_loss = 0.0
del epoch_end_indices[0]
except tf.errors.OutOfRangeError:
# We have reached the end of the data.
pass
# Always save a final checkpoint when complete.
saver.save(sess, self._save_path, global_step=epoch + 1)
############################################################## TIMING
time2 = time.time()
print("TIMING: model fitting took %0.3f s" % (time2 - time1), self.verbose)
############################################################## TIMING
def add_output_ops(self, graph, output):