Skip to content

Commit 940598a

Browse files
yamachucodemzs
authored andcommitted
Fix relation between IsSavedModel and isFrozen (dotnet#4197)
IsSavedModel returns true when loaded model is an-frozen model (ref: https://github.com/dotnet/machinelearning/blob/1503b0aa9cac997cff8b8bc7e2075eb23d61ad81/src/Microsoft.ML.Dnn/DnnUtils.cs#L137 ) but now isFrozen variable is set true in spite of an-frozen model.
1 parent e19369b commit 940598a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.ML.Dnn/DnnRetrainTransform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ private protected override void SaveModel(ModelSaveContext ctx)
683683
// for each output column
684684
// int: id of output column name
685685
// stream: tensorFlow model.
686-
var isFrozen = DnnUtils.IsSavedModel(_env, _modelLocation);
686+
var isFrozen = !DnnUtils.IsSavedModel(_env, _modelLocation);
687687
ctx.Writer.WriteBoolByte(isFrozen);
688688
ctx.Writer.WriteBoolByte(_addBatchDimensionInput);
689689

0 commit comments

Comments
 (0)