File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ public class Training
88 {
99 public static void train_and_evaluate ( )
1010 {
11- var executor = new _TrainingExecutor ( ) ;
12- executor . run ( ) ;
11+ // var executor = new _TrainingExecutor();
12+ // executor.run();
1313 }
1414 }
1515}
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ You may obtain a copy of the License at
1414 limitations under the License.
1515******************************************************************************/
1616
17+ using Google . Protobuf ;
1718using System . IO ;
1819using Tensorflow . Util ;
1920
@@ -37,7 +38,9 @@ private GraphDef _as_graph_def(bool add_shapes = false)
3738 using ( var buffer = ToGraphDef ( status ) )
3839 {
3940 status . Check ( true ) ;
40- def = GraphDef . Parser . ParseFrom ( buffer . MemoryBlock . Stream ( ) ) ;
41+ // limit size to 250M, recursion to max 100
42+ var inputStream = CodedInputStream . CreateWithLimits ( buffer . MemoryBlock . Stream ( ) , 250 * 1024 * 1024 , 100 ) ;
43+ def = GraphDef . Parser . ParseFrom ( inputStream ) ;
4144 }
4245
4346 // Strip the experimental library field iff it's empty.
You can’t perform that action at this time.
0 commit comments