Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

LayerCalculator.py 205 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
  1. from torch import Tensor
  2. from torch import nn
  3. from typing import List, Any
  4. def calculate_listed_layer(layers: List[Any], x: Tensor) -> Tensor:
  5. for layer in layers:
  6. x = layer(x)
  7. return x
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...