Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

Unable to import trax

I was trying to import Trax on Jupyter Notebook, and it gave me an error message. I am running the Python 3.11 version. installed trax using the " pip install Trax command." All the ...
user13045135's user avatar
0 votes
0 answers
44 views

Trax -> AttributeError: 'list' object has no attribute 'rng'

I am new to Trax and am trying to code a transformer using it. When I try to run the training loop, it shows the error: --------------------------------------------------------------------------- ...
Palaash Goel's user avatar
0 votes
1 answer
93 views

What is the difference between Parallel and Branch combinators in Trax?

I don't understand what's the difference between the Branch and the Parallel combinators. They both seem to apply a list of layers in parallel, the only difference is that Branch applies them to ...
mrbuttonsmeow's user avatar
1 vote
1 answer
157 views

Is there a model.summary() in Trax?

I'm working with Trax, a framework built by the Google Brain team to work with deep learning models as an alternative to TensorFlow. As a TensorFlow developer, I'm pretty used to the model.summary() ...
Emiliano Viotti's user avatar
0 votes
1 answer
52 views

MaxPooling 1D layer in Trax

How can I code my own MaxPooling_1D layer in google Trax? I understand that current max pooling is based on 2D max pooling. Here's how I tried using Keras 1d layer import trax.layers as tl def ...
sannidhya malpani's user avatar
1 vote
0 answers
50 views

Can I write a Neural Network with Trax in a functional way?

I am trying to learn Trax. I have previous exprience with Tensorflow, and I prefer writing neural networks with functional api(https://www.tensorflow.org/guide/keras/functional). I was wondering if it ...
EmperorAurelian's user avatar
1 vote
1 answer
668 views

No module named 'trax'

Guys, Help we with this, I installed trax with pip install trax, but it showing error, after restarting the kernel also Getting this error.
Aravind R's user avatar
  • 1,273
1 vote
1 answer
185 views

Import trax takes too long to load

I was stumped the first time I loaded this library. In my local computer it tooks me at least 40s to load trax on a local Jupyter Notebook and more than 1 minute to load it on a shared Colab ...
Emiliano Viotti's user avatar
1 vote
0 answers
130 views

How to switch to predict mode in Trax after training a model?

I'm familiarizing myself with the Trax library for building deep learning models and one question that I can't find an answer to is how to switch from "train" mode to "eval" mode ...
djvaroli's user avatar
  • 1,373
6 votes
3 answers
14k views

How to install trax, jax, jaxlib on M1 Mac on macOS 12?

trax New to trax, I'm trying to run it locally (macOS 12.1, Apple Silicon ARM M1 processor, 8GB RAM, Anaconda), but I'm running into some issues. In an environment with python 3.8.5, I installed trax ...
arturomp's user avatar
  • 29.5k
1 vote
0 answers
50 views

How to use multiple heads option in selfAttention class?

I am playing around with Self-attention model from trax library. when I set n_heads=1, everything works fine. But when I set n_heads=2, my code breaks. I use only input activations and one ...
Kenenbek Arzymatov's user avatar
3 votes
1 answer
480 views

trax tl.Relu and tl.ShiftRight layers are nested inside Serial Combinator

I am trying to build an attention model but Relu and ShiftRight layer by default nested inside the Serial Combinator. This further gives me errors in training. layer_block = tl.Serial( tl.Relu(), ...
user16341689's user avatar
1 vote
0 answers
61 views

Why does Trax automatically create a Serial layer over a sublayer?

I implemented a Serial Layer in Trax (deep learning library by Google). Why does an additional Serial layer is created in spite of already declaring one? Below is the code. model = tl.Serial( ...
Aditya Khanke's user avatar
0 votes
1 answer
315 views

Reimplementing bert-style pooler throws shape error as if length-dimension were still needed

I have trained an off-the-shelf Transformer(). Now I want to use the encoder in order to build a classifier. For that I want to only use the first token's output (bert-style cls-token-result) and run ...
Phillip Bock's user avatar
  • 1,889
0 votes
1 answer
418 views

Is the module trax.fastmath deprecated?

Is the module trax.fastmath of TRAX package deprecated? I am using this module, but ModuleNotFoundError is returned.
Nanda's user avatar
  • 393
0 votes
1 answer
679 views

module 'trax.supervised' has no attribute 'inputs'

I am working on a project involving Google's TRAX package. I encountered the following error message while running a snippet of code on Jupyter notebook. module 'trax.supervised' has no attribute '...
Nanda's user avatar
  • 393
1 vote
1 answer
201 views

TensorBoard with Trax

Anyone managed to log the loss with TensorBoard? I am using the trax ml library. I am getting this error TypeError: 'SummaryWriter' object is not callable. I am using the SummaryWriter from jaxboard ...
Exa's user avatar
  • 468
1 vote
1 answer
360 views

creating a custom TFDS dataset

I would like to create a custom tensorflow dataset for summarization task. I have a set of reports with three gold summaries for every report. All the data is in (.txt) format. I would like to create ...
Nadhem's user avatar
  • 23
0 votes
2 answers
419 views

What is *.subwords file in natural language processing to use as vocabulary file?

I have been trying to create a vocab file in a nlp task to use in tokenize method of trax to tokenize the word but i can't find which module/library to use to create the *.subwords file. Please help ...
Ashish Upadhyay 123's user avatar
0 votes
1 answer
213 views

Select task from Trax loop

I have a Trax loop object, from which I would like to extract a task object. The code below returns the error AttributeError: 'Loop' object has no attribute '_task'. Do you have suggestions on how to ...
randomal's user avatar
  • 6,582
0 votes
1 answer
357 views

AttentionQKV from Trax

The AttentionQKV layer implemented by Trax is as the following: AttentionQKV def AttentionQKV(d_feature, n_heads=1, dropout=0.0, mode='train'): """Returns a layer that maps (q, k, v, ...
Charles Ju's user avatar
  • 1,239
1 vote
1 answer
178 views

Multivariate regression using trax

How do I set up a multi-variate regression problem using Trax? I get AssertionError: Invalid shape (16, 2); expected (16,). from the code below, coming from the L2Loss object. The following is my ...
Dave's user avatar
  • 8,049
1 vote
1 answer
935 views

Understanding introductory example on transformers in Trax

My goal is to understand the introductory example on transformers in Trax, which can be found at https://trax-ml.readthedocs.io/en/latest/notebooks/trax_intro.html: import trax # Create a Transformer ...
Sebastian Thomas's user avatar
7 votes
1 answer
2k views

What is the difference between JAX, Trax, and TensorRT, in simple terms?

I have been using TensorRT and TensorFlow-TRT to accelerate the inference of my DL algorithms. Then I have heard of: JAX https://github.com/google/jax Trax https://github.com/google/trax Both seem ...
Aizzaac's user avatar
  • 3,308