(tensor_or_dtype)
| 227 | |
| 228 | |
| 229 | def IsTrainable(tensor_or_dtype): |
| 230 | if isinstance(tensor_or_dtype, ops.Tensor): |
| 231 | dtype = tensor_or_dtype.dtype |
| 232 | else: |
| 233 | dtype = tensor_or_dtype |
| 234 | dtype = dtypes.as_dtype(dtype) |
| 235 | return dtype.base_dtype in (dtypes.float16, dtypes.float32, dtypes.float64, |
| 236 | dtypes.complex64, dtypes.complex128, |
| 237 | dtypes.resource, dtypes.variant) |
| 238 | |
| 239 | |
| 240 | def _IsBackpropagatable(tensor): |
no outgoing calls
no test coverage detected