<commit_before>!!! summary
    The [`dynaml.tensorflow.dtf`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/#io.github.mandar2812.dynaml.tensorflow.package) 
    object can be used to create and transform tensors.
    
To use DynaML's tensorflow API, import it in your code/script/DynaML shell session.

```scala
import io.github.mandar2812.dynaml.tensorflow._
import org.platanios.tensorflow.api._
```

## Creating Tensors.

Creating tensors using the [`dtf`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/#io.github.mandar2812.dynaml.tensorflow.package$$dtf$) 
object is easy, the user needs to provide a scala collection containing the
the data, the shape and data-type of the tensor. 

There is more than one way to instantiate a tensor.

### Enumeration of Values

```scala
import io.github.mandar2812.dynaml.tensorflow._
import org.platanios.tensorflow.api._

//Create a float tensor
val tensor_float = dtf.tensor_from[Float](
  FLOAT32, Shape(2, 2))(
  1f, 2f, 3f, 4f)

//Prints out a summary of the values in tensor1
tensor_float.summarize()
<commit_msg>docs: Tensorflow API docs (3)<commit_after>!!! summary
    The [`dtf`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/#io.github.mandar2812.dynaml.tensorflow.package) 
    object can be used to create and transform tensors.
    
To use DynaML's tensorflow API, import it in your code/script/DynaML shell session.

```scala
import io.github.mandar2812.dynaml.tensorflow._
import org.platanios.tensorflow.api._
```

## Creating Tensors.

Creating tensors using the [`dtf`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/#io.github.mandar2812.dynaml.tensorflow.package) 
object is easy, the user needs to provide a scala collection containing the
the data, the shape and data-type of the tensor. 

There is more than one way to instantiate a tensor.

### Enumeration of Values

```scala
import io.github.mandar2812.dynaml.tensorflow._
import org.platanios.tensorflow.api._

//Create a float tensor
val tensor_float = dtf.tensor_from[Float](
  FLOAT32, Shape(2, 2))(
  1f, 2f, 3f, 4f)

//Prints out a summary of the values in tensor1
tensor_float.summarize()

{'fraction_non_alphanumeric': 0.11320754716981132, 'fraction_numerical': 0.022911051212938006, 'mean_word_length': 4.498765432098765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7447626', 'n_tokens_mistral': 824, 'n_tokens_neox': 755, 'n_words': 206}