Sets whether to use ResourceVariables for this scope.
(self, use_resource)
| 1410 | self._dtype = dtype |
| 1411 | |
| 1412 | def set_use_resource(self, use_resource): |
| 1413 | """Sets whether to use ResourceVariables for this scope.""" |
| 1414 | if context.executing_eagerly() and not use_resource: |
| 1415 | raise ValueError("When eager execution is enabled, " |
| 1416 | "use_resource cannot be set to false.") |
| 1417 | self._use_resource = use_resource |
| 1418 | |
| 1419 | def set_regularizer(self, regularizer): |
| 1420 | """Set regularizer for this scope.""" |