当前位置:网站首页>求网络的flops
求网络的flops
2022-07-24 05:15:00 【小新很新】
from tensorflow.keras import Model, Input
from tensorflow.keras.layers import Dense, Flatten, Conv2D, MaxPooling2D, Dropout
from keras_flops import get_flops
# build model
# build model
# inp = Input((32, 32, 1))
# x = Conv2D(32, kernel_size=(3, 3), activation="relu")(inp)
# x = MaxPooling2D(pool_size=(2, 2))(x)
# x = Flatten()(x)
# x = Dense(128, activation="relu")(x)
# out = Dense(10, activation="softmax")(x)
# model = Model(inp, out)
from tensorflow.keras.applications.resnet import ResNet101
model = ResNet101(weights=None,input_shape=(480,480,3), classes=3)
model.summary()
# calculae flops
flops = get_flops(model, batch_size=1)
print(f"flops: {flops / 10 ** 9:.03} g")
边栏推荐
- SSM整合
- Learning some contents of vector and iterator
- Reading excerpts from Liu run's "bottom logic"
- Basic knowledge of MySQL database
- Pointer learning diary (I)
- Jetson device failed to download repository information use tips to record
- Performance test process
- [basic 7] - exceptions, capture and customize exceptions
- High performance architecture design of wechat circle of friends
- ZY: modify host name
猜你喜欢

【深度学习】(三)图像分类

Heavy! The 2022 China open source development blue book was officially released

MGRE and OSPF comprehensive experiment

PostgreSQL: run PostgreSQL + pgadmin 4 in docker

I'm interested in reading efficient reading - the most cost-effective self investment

How to avoid the most common mistakes when building a knowledge base?

太空可再生能源的代币化

PPPoE网关模拟环境搭建
![Knowledge record of College Physics C in advance in summer [update]](/img/c4/76b669c3229a365a5e2567f7fb824e.png)
Knowledge record of College Physics C in advance in summer [update]

Image to image translation with conditional advantageous networks paper notes
随机推荐
Introduction to 51 single chip microcomputer (dedicated to the most understandable article for beginners)
How can NFT, whose stars enter the market against the market, get out of the independent market?
Embedded system transplantation [2] - Construction of cross development environment
jdbc封装一个父类减少代码重复
The world's first large aerospace model came out. Wenxin's second supplement "Fuchun Mountain Residence map" is Baidu Pratt Whitney AI's perseverance
Pointer learning diary (I)
Performance test process
[Huang ah code] Introduction to MySQL - 3. I use select *, and the boss directly rushed me home by train, but I still bought a station ticket
Blue Bridge Cup 31 day sprint 21 day (C language)
Memorandum 2022
Using a* heuristic search to solve maze routing problem
un7.23:如何在linix上安装MySQL?
Installation and login login
DNS domain name resolution service
Icml2022 | rock: causal reasoning principle on common sense causality
SSH service
Binary SCA fingerprint extraction black Technology: go language Reverse Technology
Career planning route
MS simulated written test
The network NN can calculate the NTCP provided by the host system