Skip to content

Commit ed62e5e

Browse files
authored
Update INTRO.md
1 parent a09419a commit ed62e5e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

INTRO.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ Currently, torch.Variable returns torch.tensor and torch.tensor can function as
2222

2323
| | TensorFlow | PyTorch |
2424
|---------------|------------------------------------------------------|----------------------------------------------------|
25-
| Numpy to tensor | [Numpy to tf.Tensor](https://github.com/tango4j/tensorflow-vs-pytorch#numpy-to-tftensor) | [Numpy to torch.Tensor](https://github.com/tango4j/tensorflow-vs-pytorch#numpy-to-torchtensor) |
25+
| Numpy to tensor | [Numpy to tf.Tensor](https://github.com/tango4j/tensorflow-vs-pytorch#numpy-to-tftensor) tf.convert_to_tensor(numpy_array, np.float32) | [Numpy to torch.Tensor](https://github.com/tango4j/tensorflow-vs-pytorch#numpy-to-torchtensor) torch.from_numpy(numpy_array) |
2626
| Tensor to Numpy | [tf.Tensor to Numpy](https://github.com/tango4j/tensorflow-vs-pytorch#tftensor-to-numpy) | [torch.Tensor to Numpy](https://github.com/tango4j/tensorflow-vs-pytorch#torchtensor-to-numpy) |
27+
| | tensorflow_tensor.eval() or tf.convert_to_tensor(numpy_array, np.float32) |torch_for_numpy.numpy()
28+
|---------------|------------------------------------------------------|----------------------------------------------------|
2729

2830
## TABLE OF CONTENTS
2931

0 commit comments

Comments
 (0)