X

Gemini Google

1 Reviews

Gemini is one of the leading AI assistants developed by Google (Alphabet) Company.

Ratings

Compare with Similar AI Apps

Prompts

1

implement self attention layer in transformer in python code using pyTorch package

Reviews

Tags


  • wilsonz1989 2024-09-03 18:19
    Interesting:3,Helpfulness:3,Correctness:4
    Prompt: implement self attention layer in transformer in python code using pyTorch package

    Overall, Gemini did a good job though not optimal in the pytorch model coding test. I asked the same question on ChatGPT vs Gemini vs Claude. Among all these three platforms, Gemini‘s python code is correct but less concise. It also uses some unusual functions of pytorch package, such as """ context.permutate(0, 2, 1, 3).view(...) """. This is just a weighted average tensor operation, so this implementation is very uncommon and not necessary. And ChatGPT and Claude use the correct function for this operation, which is """ torch.einsum().reshape() """. Even though it's not a big deal, but generating common python code in Gemini is not optimal.

Write Your Review

Detailed Ratings

ALL
Correctness
Helpfulness
Interesting
Upload Pictures and Videos