Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Polish code
Browse files Browse the repository at this point in the history
  • Loading branch information
0x45f committed Jul 17, 2023
1 parent 94b568f commit 9d63ce5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sot/opcode_translator/executor/variables/callable.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,7 @@ def call_function(self, /, *args, **kwargs):

@VariableFactory.register_from_value(successor="PaddleApiVariable")
def from_value(value: Any, graph: FunctionGraph, tracker: Tracker):
if isinstance(
value, paddle.nn.Layer
) and not value.__module__.startswith("paddle.nn."):
if isinstance(value, paddle.nn.Layer):
return UserDefinedLayerVariable(value, graph, tracker)
return None

Expand Down

0 comments on commit 9d63ce5

Please sign in to comment.