Commit Graph

13 Commits

Author SHA1 Message Date
Luke Yeager
54d42af413 Fix a workspace test
Summary:
A workspace may add a suffix such as "_1" to the net name if other nets
have been added to the workspace with the same name. This is true even
if the previous nets have been removed or if the workspace has been
reset.
Closes https://github.com/caffe2/caffe2/pull/213

Differential Revision: D4899877

Pulled By: Yangqing

fbshipit-source-id: b89b196df815dceff49a3ec76d7f658cdc4b0a38
2017-04-17 15:03:04 -07:00
Alexander Sidorov
56f324d191 Added predictor bindings to python interface
Summary: from caffe2.python import workspace; p = workspace.Predictor(init_net, predict_net); outputs = p.run(inputs)

Reviewed By: Yangqing

Differential Revision: D4576793

fbshipit-source-id: b829bbcaf2e7c34dad85024177433207bd96a234
2017-03-15 11:17:54 -07:00
Aapo Kyrola
e51e651255 Remove redundant and failing test of FeedBlob asserts
Summary: Recently a PR landed that removed asserts of trying to feed float64 to FeedBlob for GPUs and changed to a warning. Thus the test testing assertions were given started to fail. Removing it.

Reviewed By: Yangqing

Differential Revision: D4363780

fbshipit-source-id: d9e222c309302243138d4ff3c223c711a4d2052d
2016-12-22 14:59:28 -08:00
Aapo Kyrola
c1c92479bd check that numpy arrays are float32 when CUDA is used
Summary:
Recurrent developer-issue is that they pass numpy arrays with FeedBlob but forget that python float is actually double. Cuda ops in caffe2 don't allow doubles.
 Thus, I think we should reject incorrect types already at the FeedBlob() when device option is CUDA.

Added test.

Is this too strong?

Reviewed By: ajtulloch

Differential Revision: D4208153

fbshipit-source-id: 364b057a2a37b5d4b95de4e59faebdab724bb0ed
2016-11-29 15:18:37 -08:00
Yangqing Jia
0e298ec399 Expose MKLMemory to the Python Feed and Fetch interface, and misc changes
Summary:
This is #2 of a series of changes. It did the following:

(1) a few refactor of the MKL memory interface
(2) an initial MKLContext to deal with MKL specific computations
(3) Provide MKLMemory access in Python with the blob feeder/fetcher registration.

Reviewed By: dzhulgakov

Differential Revision: D4210123

fbshipit-source-id: adea1f1ffbd0b9ffdd55092676468c16bec08992
2016-11-29 15:18:36 -08:00
Yangqing Jia
589398950f fbsync at f5a877 2016-11-18 15:41:06 -08:00
Yangqing Jia
d1e9215184 fbsync 2016-10-07 13:08:53 -07:00
Yangqing Jia
b23e51d467 chunky sync 2016-09-06 15:55:19 -07:00
Yangqing Jia
bcea409c82 sync 2016-07-28 15:06:43 -07:00
Yangqing Jia
6463eebc7b chunky sync - build scripts to be written 2016-07-21 10:16:42 -07:00
Yangqing Jia
559053d3a8 chunky sync 2016-05-13 14:43:48 -07:00
Yangqing Jia
cf7ca23fc1 make caffe2.python build 2016-03-08 16:48:19 -08:00
Yangqing Jia
9ae880bb6f move pycaffe2 to caffe2.python 2016-03-08 15:45:30 -08:00