likesum / bpn Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hello, this paper is excellent work. But I have a problem with the flops of network. I count with my own code is vastly different from what is described in the paper. Is this reasonable? or is it a matter of my code statistics?
resolution: 1024x768,K=15,B=90, Burst=8, grasacale. The flops of my code output is as follows:
==================Model Analysis Report======================
Doc:
op: The nodes are operation kernel type, such as MatMul, Conv2D. Graph nodes belonging to the same type are aggregated together.
flops: Number of float operations. Note: Please read the implementation for the math behind it.
Profile:
node name | # float_ops
Conv2D 1286.04b float_ops (100.00%, 99.91%)
BiasAdd 640.54m float_ops (0.09%, 0.05%)
Softmax 354.70m float_ops (0.04%, 0.03%)
MaxPool 97.52m float_ops (0.01%, 0.01%)
Mean 47.97m float_ops (0.00%, 0.00%)
Mul 26 float_ops (0.00%, 0.00%)
Sub 2 float_ops (0.00%, 0.00%)
======================End of Report==========================
The FLOPs is:1287180783100
The flops in the paper are 29.9 GB. Is that correct?
the code to calculate the flops as follows:
def get_flops(model):
concrete = tf.function(lambda inputs: model(inputs))
concrete_func = concrete.get_concrete_function(
[tf.TensorSpec([1, *inputs.shape[1:]]) for inputs in model.inputs])
frozen_func, graph_def = convert_variables_to_constants_v2_as_graph(concrete_func)
with tf.Graph().as_default() as graph:
tf.graph_util.import_graph_def(graph_def, name='')
run_meta = tf.compat.v1.RunMetadata()
opts = tf.compat.v1.profiler.ProfileOptionBuilder.float_operation()
flops = tf.compat.v1.profiler.profile(graph=graph, run_meta=run_meta, cmd="op", options=opts)
return flops.total_float_ops
Hi,
When I was processing the 1024*1536 image, the system indicated OOM. What is the size of the feature map you processed before?
The problem might be multiplying basis and coeff, but I haven't been able to solve it yet....
This works attracts me a lot. I am trying to reproduce the result and find the pretrained model link is failed. Hopely, the author can update the link.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.