File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,21 @@ public synchronized List<String> getDependencies() {
7676 Set <String > deps = new LinkedHashSet <>();
7777
7878 for (NodeDef node : getFunctionDef ().getNodeDefList ()) {
79- if (node .getOp ().equals (ConcreteFunction .CALL_OP )
80- || node .getOp ().equals (ConcreteFunction .STATEFUL_CALL_OP )) {
81- deps .add (node .getAttrMap ().get ("f" ).getFunc ().getName ());
82- }
79+ node .getAttrMap ()
80+ .values ()
81+ .forEach (
82+ (attr ) -> {
83+ if (attr .hasFunc ()) {
84+ deps .add (attr .getFunc ().getName ());
85+ } else if (attr .hasList ()) {
86+ attr .getList ()
87+ .getFuncList ()
88+ .forEach (
89+ funcs -> {
90+ deps .add (funcs .getName ());
91+ });
92+ }
93+ });
8394 }
8495 dependencies = Collections .unmodifiableList (new ArrayList <>(deps ));
8596 }
You can’t perform that action at this time.
0 commit comments