**Notes**: **This API is ONLY available in Dygraph mode** Returns a numpy array shows the value of current :ref:`api_guide_Variable_en` Returns: ndarray: The numpy value of current Variable. Returns type: ndarray: dtype is same as
(self, *, force=True)
| 1392 | |
| 1393 | @fake_interface_only |
| 1394 | def numpy(self, *, force=True): |
| 1395 | """ |
| 1396 | **Notes**: |
| 1397 | **This API is ONLY available in Dygraph mode** |
| 1398 | Returns a numpy array shows the value of current :ref:`api_guide_Variable_en` |
| 1399 | Returns: |
| 1400 | ndarray: The numpy value of current Variable. |
| 1401 | Returns type: |
| 1402 | ndarray: dtype is same as current Variable |
| 1403 | Examples: |
| 1404 | .. code-block:: pycon |
| 1405 | |
| 1406 | >>> import paddle |
| 1407 | >>> import paddle.base as base |
| 1408 | >>> from paddle.nn import Linear |
| 1409 | >>> import numpy as np |
| 1410 | >>> data = np.random.uniform(-1, 1, [30, 10, 32]).astype('float32') |
| 1411 | >>> with base.dygraph.guard(): |
| 1412 | ... linear = Linear(32, 64) |
| 1413 | ... data_tensor = paddle.to_tensor(data) |
| 1414 | ... x = linear(data_tensor) |
| 1415 | ... print(x.numpy()) |
| 1416 | """ |
| 1417 | pass |
| 1418 | |
| 1419 | @fake_interface_only |
| 1420 | def tolist(self): |
nothing calls this directly
no outgoing calls
no test coverage detected