Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed close() routine to free up closed tensor in feedMap by setting …
…feedMap to null.
  • Loading branch information
JimClarke5 committed Sep 23, 2020
commit e9e2b24608f83de551608aa935caffff328a71d9
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ protected Op finish(List<Op> updateOperations, String name) {
/**
* Sets the learning rate
*
* @param newLearningRate the new earning rate
* @param newLearningRate the new learning rate
*/
public final void setLearningRate(float newLearningRate) {
if (learningRatePlaceholder == null) {
Expand Down Expand Up @@ -315,7 +315,7 @@ protected Operand<TFloat32> getLearningRateOperand() {
* Gets the Feed Map for the run methods to set the Placeholder value(s). Each entry in the Feed
* Map contains a PlaceHolder and a Tensor with the value
*
* @return the current Feed Map for the run methods, this may be null if an LearningRate as an
* @return the current Feed Map for the run methods, this may be null if the LearningRate is an
* Operand has been set.
*/
public Map<Operand<? extends TType>, Tensor<? extends TType>> getFeedMap() {
Expand All @@ -329,6 +329,7 @@ public void close() {
learningRateTensor.close();
learningRateTensor = null;
}
if (feedMap != null) feedMap = null;
}

/** Optional attributes for {@link org.tensorflow.framework.optimizers.Optimizer} */
Expand Down