-
Notifications
You must be signed in to change notification settings - Fork 3
/
changing-keras-version.html
189 lines (140 loc) · 6.25 KB
/
changing-keras-version.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html lang="en">
<head>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-112480279-1');
</script>
<meta charset="utf-8">
<title>channelCS - Changing Keras Version</title>
<meta name="description" content="">
<meta name="author" content="channelCS">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="/theme/html5.js"></script>
<![endif]-->
<!-- Le styles -->
<link href="/theme/bootstrap.min.css" rel="stylesheet">
<link href="/theme/bootstrap.min.responsive.css" rel="stylesheet">
<link href="/theme/local.css" rel="stylesheet">
<link href="/theme/pygments.css" rel="stylesheet">
<!-- So Firefox can bookmark->"abo this site" -->
<link href="/feeds/all.atom.xml" rel="alternate" title="channelCS" type="application/atom+xml">
</head>
<body>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="">channelCS</a>
<div class="nav-collapse">
<ul class="nav">
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="content">
<div class="row">
<div class="span9">
<div class='article'>
<div class="content-title">
<h1>Changing Keras Version</h1>
Thu 22 March 2018
by <a class="url fn" href="/author/aditya-arora.html">Aditya Arora</a>
</div>
<div><p>Sometimes, we get errors which when looked up as <strong>Github issues</strong> dont give us a solid answer. It is told to change <strong>Theano</strong> versions to using <strong>CPU</strong>. A simple trick is to downgrade your keras version from <code>2.1.x</code> to <code>2.0.y</code> where <code>y<=5</code>.
For this we have to check which version we currently have. Also note that the previous versions are not available in <code>conda</code>. This means we have to use <code>pip</code>for installations. Also, we dont want to change any other dependencies as they are working well.
- Check keras version</p>
<div class="highlight"><pre><span></span>$ conda list keras
</pre></div>
<p>Output</p>
<div class="highlight"><pre><span></span># packages in environment at C:\Anaconda2:
#
keras 2.1.5 py27_0 conda-forge
</pre></div>
<p>We have <code>Keras 2.1.5</code> and wwant to switch to <code>Keras 2.0.5</code> without altering any dependencies. We remove keras with <code>--force</code>.</p>
<div class="highlight"><pre><span></span>$ conda remove keras --force
</pre></div>
<p>We now install keras with no dependencies using <code>--no-deps</code> flag.</p>
<div class="highlight"><pre><span></span>$ pip install <span class="nv">keras</span><span class="o">==</span><span class="m">2</span>.0.5 --no-deps
</pre></div>
<p>Output</p>
<div class="highlight"><pre><span></span>Collecting keras==2.0.5
Downloading Keras-2.0.5.tar.gz (216kB)
100% |################################| 225kB 639kB/s
Building wheels for collected packages: keras
Running setup.py bdist_wheel for keras ... done
Stored in directory: C:\Users\dell\AppData\Local\pip\Cache\wheels\f9\8d\c5\efc2eeea676156ca5bed9
cfbdb63098c40336d7d2b269be5ea
Successfully built keras
Installing collected packages: keras
Successfully installed keras-2.0.5
</pre></div></div>
<hr>
<h2>Comments</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'channelcsgit';
var disqus_title = 'Changing Keras Version';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</div>
<div class="span3">
<div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
<ul class="nav nav-list">
<li class="nav-header">
Site
</li>
<li><a href="/archives.html">Archives</a>
<li><a href="/tags.html">Tags</a>
<li><a href="/feeds/all.atom.xml" rel="alternate">Atom feed</a></li>
</ul>
</div>
<div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
<ul class="nav nav-list">
<li class="nav-header">
Categories
</li>
<li><a href="/category/audio-processing.html">Audio Processing</a></li>
<li><a href="/category/deep-learning.html">Deep Learning</a></li>
<li><a href="/category/docs.html">Docs</a></li>
<li><a href="/category/github.html">Github</a></li>
<li><a href="/category/main.html">main</a></li>
<li><a href="/category/outreachy.html">Outreachy</a></li>
</ul>
</div>
<div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
<ul class="nav nav-list">
<li class="nav-header">
Links
</li>
<li><a href="http://github.com/channelCS">Github</a></li>
<li><a href="http://github.com/Deeplearn-lab">Deeplearn-lab</a></li>
</ul>
</div>
</div>
</div> </div>
<footer>
<br />
<p><a href="">channelCS</a> © channelCS 2018</p>
</footer>
</div> <!-- /container -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="/theme/bootstrap-collapse.js"></script>
</body>
</html>