amd

How to run TensorFlow on AMD/ATI GPU?

强颜欢笑 提交于 2019-12-06 00:15:46
After reading this tutorial https://www.tensorflow.org/guide/using_gpu I checked GPU session on this simple code import numpy as np import matplotlib.pyplot as plt import tensorflow as tf a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2,3], name = 'a') b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape = [3,2], name = 'b') c = tf.matmul(a, b) with tf.Session(config=tf.ConfigProto(log_device_placement=True)) as sess: x = sess.run(c) print(x) The output was 2018-08-07 18:44:59.019144: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this

Using Meteor with Requirejs

删除回忆录丶 提交于 2019-12-05 16:03:51
问题 How can I integrate requirejs in a meteor app and use AMD–modules, e.g for my Backbone modules? Has anybody done that and can tell me what steps are needed to get this working? 回答1: One simple answer (though maybe not the one you're looking for) is that you can simply use the two independently. In other words, load all of your meteor scripts, then start your require-ified scripts loading. Your require-ified scripts will be able to use the Meteor stuff just fine, without having to "import" any

JavaScript Modules, Closures and Scope

左心房为你撑大大i 提交于 2019-12-05 16:01:55
I am using the following closure pattern to modularise my code: (function(root) { // MODULE CODE HERE if (typeof module !== 'undefined' && module.exports) { // CommonJS /* var dependencies = require(...) */ module.exports = myModule; } else if (typeof define !== 'undefined' && define.amd) { // AMD /* var dependencies...; */ define([/* dependencies */], function(/* dependencies */) { /* Assign closure level vars to respective arguments */ return myModule; }); } else { // Dependencies?? root.myModule = myModule; } })(this); i.e., We use feature detection to support CommonJS modules (e.g., node

ES6 module's “import” officially compatible with CommonJS and AMD?

早过忘川 提交于 2019-12-05 12:00:19
From this article : https://hacks.mozilla.org/2015/08/es6-in-depth-modules/ It is written that The new standard is designed to interoperate with existing CommonJS and AMD modules. And more precisely All CommonJS and AMD modules are presented to ES6 as having a default export If it is really the case all we'd need is a ES6 polyfill and we wouldn't have to do use anything else. Yet for eg this ES6 Polyfill : https://github.com/ModuleLoader/es6-module-loader doesn't seem to allow loading CommonJS/AMD modules from ES6 but only solutions built on top of it like SystemJS allow it. So the question is

None of the Genymotion Emulator are showing up under connected devices in Android Studio

邮差的信 提交于 2019-12-05 10:12:26
问题 I have successfully installed Android Studio, it works really great thus far. I have also downloaded Genymotion which came with virtual box, that works really great thus far as well. In Genymotion , I added the file path from Android Studio Tools which I copied and paste from SDK Manager. In Android Studio, as well, I added the path ( I believe the Default file path it is): C:\Program File\GenyMobile\Genymotion I then started the device in Genymotion of my choice , the emulator showed up

Bootstrapping a Backbone application

送分小仙女□ 提交于 2019-12-05 09:38:40
I have seen a couple of ways on how to do this, but I can never figure out which is the 'correct' way. Jeffrey Way from NetTuts+ and Addy Osmani instantiate a 'main' application view in order to kick off their applications. require(['views/app'], function(AppView) { new AppView(); }); Ryan Bates from Railscasts starts his application by instantiating a router which then handles subsequent requests: window.App = Models: {} Collections: {} Views: {} Routers: {} init: -> new App.Router() Backbone.history.start() } } $(document).ready -> App.init() Is there an important difference between these

Importing TypeScript Module located in path lower than current path throws Scope Error

丶灬走出姿态 提交于 2019-12-05 08:32:43
In an attempt to put together an AMD-friendly TypeScript application skeleton, I've run into a snag: I can't seem to drop down from my current path to import a module in another directory. I can import modules that are above, but below throws an error: TypeScript Error: The name ''../core/View'' does not exist in the current scope Here the is the structure of my (very basic) app: app/ - core/ - View.ts - views/ - HomeView.ts - Application.ts In my Application.ts file, I can successfully import a module like so: import HomeView = module( 'views/HomeView' ); export class Application {

requirejs - Performance of multiple calls to require

送分小仙女□ 提交于 2019-12-05 08:05:21
I'm wondering what is the proper approach for using RequireJS in a project with multiple modules, regarding performance of multiple require calls with less dependencies vs a single require with all the dependencies. Let's take the case where, for an app, I need to load some modules: gmaps, jquery, module1, module2, module3 . The use for some of the modules is quite independent. So, the question is which of the following alternatives is recommended (supposedly this code is the main module loaded into the page): require(['gmaps'], function(gmaps){ gmaps.use(); }); require(['jquery','module1'],