Original presentation available on GitHub: https://pgaleone.eu/tf-function-talk/
Meetup: https://www.meetup.com/it-IT/Machine-Learning-Data-Science-Meetup/events/264338606/
Machine Learning With Python From India’s Most Advanced Learner’s Community. 200+ High-Quality Lectures. 4 Months Live Mentor-ship. 15+ Projects. Industry Insights.
Visit- https://insideaiml.com/course-details/Machine-Learning-with-Python-Statistics
This presentation covers a detailed overview of python advanced concepts. it covers the below aspects.
Comprehensions
Lambda with (map, filter and reduce)
Context managers
Iterator, Generators, Decorators
Python GIL and multiprocessing and multithreading
Python WSGI
Python Unittests
Machine Learning With Python From India’s Most Advanced Learner’s Community. 200+ High-Quality Lectures. 4 Months Live Mentor-ship. 15+ Projects. Industry Insights.
Visit- https://insideaiml.com/course-details/Machine-Learning-with-Python-Statistics
This presentation covers a detailed overview of python advanced concepts. it covers the below aspects.
Comprehensions
Lambda with (map, filter and reduce)
Context managers
Iterator, Generators, Decorators
Python GIL and multiprocessing and multithreading
Python WSGI
Python Unittests
following is work on Advance Python part 1 Functional Programming in Python
for code and more details plz do visit
https://lnkd.in/dnQF95z
for more free study material and Projects follow on
Github
https://lnkd.in/gYKtuB3
LinkedIn
https://lnkd.in/daSvf_P
#python #datascience #programming #machinelearning #github #deeplearning #coding #developer #projects #work #developers #linkedin #google #amazonindia#IBM
Introduction to Python Programming | InsideAIMLVijaySharma802
Machine Learning With Python From India’s Most Advanced Learner’s Community. 200+ High-Quality Lectures. 4 Months Live Mentor-ship. 15+ Projects. Industry Insights.
Visit- https://insideaiml.com/course-details/Machine-Learning-with-Python-Statistics
Contains C programming tutorial for beginners with lot of examples explained. This tutorial contains each and every feature of C programming that will help you. C programming tutorial covering basic C Programming examples, data types, functions, loops, arrays, pointers, etc.
Using functional concepts in Python. Introduction to functional programming and exploring each of the concepts, like map, filter and reduce in detail and how functional programming can help creating massively parallel software systems
Programming is an essential skill if you seek a career in software development, or in other fields of Coding. This fundamental of programming course is the first in the specialization for Introduction to Programming in C, but its lessons extend to any language you might want to study. This is because programming is primarily about solving a set of problems and writing the algorithm.
TF2.0 is designed to improve usability and productivity. As a TF's enthusiastic user, I am very excited. Personally, I think the most important thing about usability is "how does TF provide a user-friendly API?" Aside from the other aspects in TF 2.0, this post was a quick review from an API usage perspective.
A fast-paced introduction to TensorFlow 2 regarding some important new features (such as generators and the @tf.function decorator), along with tf.data code samples and lazy operators. We'll also delve into the key ideas underlying CNNs, RNNs, and LSTMs, followed by some Keras-based code blocks.
following is work on Advance Python part 1 Functional Programming in Python
for code and more details plz do visit
https://lnkd.in/dnQF95z
for more free study material and Projects follow on
Github
https://lnkd.in/gYKtuB3
LinkedIn
https://lnkd.in/daSvf_P
#python #datascience #programming #machinelearning #github #deeplearning #coding #developer #projects #work #developers #linkedin #google #amazonindia#IBM
Introduction to Python Programming | InsideAIMLVijaySharma802
Machine Learning With Python From India’s Most Advanced Learner’s Community. 200+ High-Quality Lectures. 4 Months Live Mentor-ship. 15+ Projects. Industry Insights.
Visit- https://insideaiml.com/course-details/Machine-Learning-with-Python-Statistics
Contains C programming tutorial for beginners with lot of examples explained. This tutorial contains each and every feature of C programming that will help you. C programming tutorial covering basic C Programming examples, data types, functions, loops, arrays, pointers, etc.
Using functional concepts in Python. Introduction to functional programming and exploring each of the concepts, like map, filter and reduce in detail and how functional programming can help creating massively parallel software systems
Programming is an essential skill if you seek a career in software development, or in other fields of Coding. This fundamental of programming course is the first in the specialization for Introduction to Programming in C, but its lessons extend to any language you might want to study. This is because programming is primarily about solving a set of problems and writing the algorithm.
TF2.0 is designed to improve usability and productivity. As a TF's enthusiastic user, I am very excited. Personally, I think the most important thing about usability is "how does TF provide a user-friendly API?" Aside from the other aspects in TF 2.0, this post was a quick review from an API usage perspective.
A fast-paced introduction to TensorFlow 2 regarding some important new features (such as generators and the @tf.function decorator), along with tf.data code samples and lazy operators. We'll also delve into the key ideas underlying CNNs, RNNs, and LSTMs, followed by some Keras-based code blocks.
A fast-paced introduction to TensorFlow 2 about some important new features (such as generators and the @tf.function decorator) and TF 1.x functionality that's been removed from TF 2 (yes, tf.Session() has retired).
Some concise code samples are presented to illustrate how to use new features of TensorFlow 2.
Python is a high level language focused on readability. The Python community developed the concept of "Pythonic Code", requiring not only semantic correctness, but also conformity to universally acknowledged stylistic criteria.
A pre-requisite to write pythonic code is to write idiomatic code. Using the right idioms is a matter of acquired taste and experience, however, some idioms are quite easy to learn.
This presentation focuses on some of these idioms and other stylistic criteria:
* for vs. while
* iterators, itertools
* code conventions (space invaders)
* avoid default values bugs
* first order functions
* internal/external iterators
* substituting the switch statement
* properties, attributes, read only objects
* named tuples
* duck typings
* bits of metaprogramming
* exception management: LBYL vs. EAFP
This fast-paced session starts with an introduction to neural networks and linear regression models, along with a quick view of TensorFlow, followed by some Scala APIs for TensorFlow. You'll also see a simple dockerized image of Scala and TensorFlow code and how to execute the code in that image from the command line. No prior knowledge of NNs, Keras, or TensorFlow is required (but you must be comfortable with Scala).
Similar to Paolo Galeone - Dissecting tf.function to discover auto graph strengths and subtleties (20)
Presentato al sesto WebMeetup del Machine Learning / Data Science Meetup Roma: https://www.meetup.com/it-IT/Machine-Learning-Data-Science-Meetup/events/273089965/
Presentazione per il sesto WebMeetup del Machine Learning / Data Science Meetup Roma: https://www.meetup.com/it-IT/Machine-Learning-Data-Science-Meetup/events/273089965/
Multimodal AI Approach to Provide Assistive Services (Francesco Puja)MeetupDataScienceRoma
Presentazione dal Meetup del Machine Learning / Data Science Meetup di Roma - Giugno 2019:
https://www.meetup.com/it-IT/Machine-Learning-Data-Science-Meetup/events/262120815/
Presentazione dal Meetup del Machine Learning / Data Science Meetup di Roma - Giugno 2019:
https://www.meetup.com/it-IT/Machine-Learning-Data-Science-Meetup/events/262120815/
Zero, One, Many - Machine Learning in Produzione (Luca Palmieri)MeetupDataScienceRoma
Talk dal Meetup del Machine Learning / Data Science Meetup di Roma - Giugno 2019:
https://www.meetup.com/it-IT/Machine-Learning-Data-Science-Meetup/events/262120815/
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Paolo Galeone - Dissecting tf.function to discover auto graph strengths and subtleties
1. /
Dissecting tf.function to discover
AutoGraph strengths and subtleties
How to correctly write graph-convertible functions in TensorFlow 2.0.
2. /
About me
Computer engineer | Head of ML & CV @ ZURU Tech Italy | Machine Learning GDE
Blog: https://pgaleone.eu/
Github: https://github.com/galeone/
Twitter: @paolo_galeone
3. /
TensorFlow 2.0 & DataFlow Graphs
Execution Speed
Language Agnostic Representation
Easy to replicate and distribute
Automatic Differentiation
4. /
tf.function and AutoGraph
# tf.function signature: it is a decorator.
def function(func=None,
input_signature=None,
autograph=True,
experimental_autograph_options=None)
tf.function uses AutoGraph
AutoGraph converts Python control flow statements into appropriate TensorFlow graph ops.
7. /
TensorFlow 1.x solution
g = tf.Graph()
with g.as_default():
a = tf.constant([[10,10],[11.,1.]])
x = tf.constant([[1.,0.],[0.,1.]])
b = tf.Variable(12.)
y = tf.matmul(a, x) + b
init_op = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init_op)
print(sess.run(y))
8. /
TensorFlow 2.0 solution: eager execution
def f():
a = tf.constant([[10,10],[11.,1.]])
x = tf.constant([[1.,0.],[0.,1.]])
b = tf.Variable(12.)
y = tf.matmul(a, x) + b
return y
print([f().numpy() for _ in range(10)])
Every tf.* op, produces a tf.Tensor object
9. /
From eager function to tf.function
@tf.function
def f():
a = tf.constant([[10,10],[11.,1.]])
x = tf.constant([[1.,0.],[0.,1.]])
b = tf.Variable(12.)
y = tf.matmul(a, x) + b
print("PRINT: ", y)
tf.print("TF-PRINT: ", y)
return y
f()
10. /
From eager function to tf.function
PRINT: Tensor("add:0", shape=(2, 2), dtype=float32)
11. /
From eager function to tf.function
ValueError: tf.function-decorated function tried to create variables on non-first call.
12. /
Lesson #1: functions that create a state
A tf.Variable object in eager mode is just a Python object that gets destroyed
as soon as it goes out of scope.
A tf.Variable object in a tf.function-decorated function is the definition of a node
in a persistent graph (eager execution disabled).
13. /
The solution
class F():
def __init__(self):
self._b = None
@tf.function
def __call__(self):
a = tf.constant([[10, 10], [11., 1.]])
x = tf.constant([[1., 0.], [0., 1.]])
if self._b is None:
self._b = tf.Variable(12.)
y = tf.matmul(a, x) + self._b
print("PRINT: ", y)
tf.print("TF-PRINT: ", y)
return y
f = F()
f()
14. /
Lesson #2: eager function is not graph-
convertible as is
There is no 1:1 match between eager execution and the graph built by
@tf.function.
Define the function thinking about the graph that is being built.
15. /
Change the input type
Python is a dynamically-typed language
TensorFlow is a strictly statically typed framework
16. /
The function
@tf.function
def f(x):
print("Python execution: ", x)
tf.print("Graph execution: ", x)
return x
The function parameters type is used to create a graph, that is a statically typed object,
and to assign it an ID
17. /
tf.Tensor as input
print("##### float32 test #####")
a = tf.constant(1, dtype=tf.float32)
print("first call")
f(a)
a = tf.constant(1.1, dtype=tf.float32)
print("second call")
f(a)
print("##### uint8 test #####")
b = tf.constant(2, dtype=tf.uint8)
print("first call")
f(b)
b = tf.constant(3, dtype=tf.uint8)
print("second call")
f(b)
18. /
tf.Tensor as input
##### float32 test #####
first call
Python execution: Tensor("x:0", shape=(), dtype=float32)
Graph execution: 1
second call
Graph execution: 1.1
##### uint8 test #####
first call
Python execution: Tensor("x:0", shape=(), dtype=uint8)
Graph execution: 2
second call
Graph execution: 3
Everything goes as we expect
19. /
Inspecting the function
tf.autograph.to_code(f.python_function)
def tf__f(x):
try:
with ag__.function_scope('f'):
do_return = False
retval_ = None
with ag__.utils.control_dependency_on_returns(ag__.converted_call(print, None, ag__.ConversionOptions(recur
tf_1, x_1 = ag__.utils.alias_tensors(tf, x)
with ag__.utils.control_dependency_on_returns(ag__.converted_call('print', tf_1, ag__.ConversionOptions(r
x_2 = ag__.utils.alias_tensors(x_1)
do_return = True
retval_ = x_1
return retval_
except:
ag__.rewrite_graph_construction_error(ag_source_map__)
20. /
Inspecting the function
with ag__.utils.control_dependency_on_returns(
ag__.converted_call(
print, None, ag__.ConversionOptions(
recursive=True,
force_conversion=False,
optional_features=ag__.Feature.ALL,
internal_convert_user_code=True),
('Python execution: ', x), {})
):
converted_call owner parameter is None: this line becomes a tf.no_op()
21. /
Python native type as input
def printinfo(x):
print("Type: ", type(x), " value: ", x)
print("##### int test #####")
print("first call")
a = 1
printinfo(a)
f(a)
print("second call")
b = 2
printinfo(b)
f(b)
print("##### float test #####")
print("first call")
a = 1.0
printinfo(a)
f(a)
print("second call")
b = 2.0
printinfo(b)
f(b)
22. /
Python native type as input
Call with Python int
##### int test #####
first call
Type: <class 'int'> value: 1
Python execution: 1
Graph execution: 1
second call
Type: <class 'int'> value: 2
Python execution: 2
Graph execution: 2
The graph is being recreated at every function invocation
23. /
Python native type as input
Call with Python float
##### float test #####
first call
Type: <class 'float'> value: 1.0
Graph execution: 1
second call
Type: <class 'float'> value: 2.0
Graph execution: 2
The return type is WRONG.
The graphs built for the integers 1 and 2 is reused for the float 1.0 and 2.0
25. /
Lesson #3: no autoboxing
That's why we used the same graph built for f(1) for f(1.0), because 1 == 1.0.
tf.function does not automatically convert a Python integer to a tf.Tensor
with dtype tf.int64, and so on.
The graph ID, when the input is not a tf.Tensor object, is built using the variable
value.
26. /
No autoboxing: performance measurement
@tf.function
def g(x):
return x
start = time.time()
for i in tf.range(1000):
g(i)
print("tf.Tensor time elapsed: ", (time.time()-start))
start = time.time()
for i in range(1000):
g(i)
print("Native type time elapsed: ", (time.time()-start))
tf.Tensor time elapsed: 0.41594886779785156
Native type time elapsed: 5.189513444900513
28. /
Python Operators
@tf.function
def if_elif(a, b):
if a > b:
tf.print("a > b", a, b)
elif a == b:
tf.print("a == b", a, b)
elif a < b:
tf.print("a < b", a, b)
else:
tf.print("wat")
x = tf.constant(1)
if_elif(x,x)
31. /
Problems
Python __eq__ is not converted to tf.equal (even in eager mode!) but checks for the
Python variable identity.
AutoGraph converts the if, elif, else statements but
AutoGraph does not converts the Python built-in operators (__eq__, __lt__, __gt__)
32. /
Python operators
@tf.function
def if_elif(a, b):
if tf.math.greater(a, b):
tf.print("a > b", a, b)
elif tf.math.equal(a, b):
tf.print("a == b", a, b)
elif tf.math.less(a, b):
tf.print("a < b", a, b)
else:
tf.print("wat")
34. /
Things are changing
The lessons presented, however, are all still valid: following them helps you writing idiomatic
TensorFlow 2.0 code.
Raphael Meudec
@raphaelmeudec
Hey @paolo_galeone, great blog post series on tf.function! I've
tried the if_elif_else case (from part 3:
pgaleone.eu/tensorflow/tf.…) this afternoon, and it looks like it
has been fixed in 2.0.0rc0. Thought you might want to know
7 4:02 PM - Sep 13, 2019
See Raphael Meudec's other Tweets
Analyzing tf.function to discover AutoGraph str…
In this third and last part, we analyze what happens …
pgaleone.eu
35. /
Recap
1. tf.Variable need a special treatment.
2. Think about the graph while designing the function: eager to graph is not straightforward.
3. There is no autoboxing of Python native types, therefore
4. Use tf.Tensor everywhere.
5. Use the TensorFlow operators explicitly everywhere.