I have a problem running Foundation Watch (gulp error) - /_input-group.scss - zurb-foundation

The compile fails because of the error:
Error in plugin "sass"
Message:
node_modules\foundation-sites\scss\forms\_input-group.scss
Error: Incompatible units: 'rem' and 'rem*rem'.
on line 25 of node_modules/foundation-sites/scss/forms/_input-group.scss, in mixin `foundation-form-prepostfix`
from line 30 of node_modules/foundation-sites/scss/forms/_forms.scss, in mixin `foundation-forms`
from line 14 of scss/app.scss
> $height: ($input-font-size * $input-line-height) + (get-side($input-paddin
-----------^
I use the input-group features in login and sign forms and can't afford to not include the foundation-forms; in my app.scss file. This problem arised when i switched from win 7 to win 10.

Thanks for the answers but I have already found the solution. I updated the _input-group.scss file. See below.
From
$height: ($input-font-size * $input-line-height) + (get-side($input-padding, 'top') + get-side($input-padding, 'bottom')) - rem-calc(1);
to
$height: ($input-font-size + $form-spacing * 1.5);
Best regards,
Jure

Related

Create frozen graph from pretrained model

Hi I am newbie to tensorflow. My aim is to convert .pb file to .tflite from pretrain model for my understanding. I have download mobilenet_v1_1.0_224 Model. Below is structure for model
mobilenet_v1_1.0_224.ckpt.data-00000-of-00001 - 66312kb
mobilenet_v1_1.0_224.ckpt.index - 20kb
mobilenet_v1_1.0_224.ckpt.meta - 3308kb
mobilenet_v1_1.0_224.tflite - 16505kb
mobilenet_v1_1.0_224_eval.pbtxt - 520kb
mobilenet_v1_1.0_224_frozen.pb - 16685kb
I know model already has .tflite file, but for my understanding I am trying to convert it.
My First Step : Creating frozen Graph file
import tensorflow as tf
imported_meta = tf.train.import_meta_graph(base_dir + model_folder_name + meta_file,clear_devices=True)
graph_ = tf.get_default_graph()
with tf.Session() as sess:
#saver = tf.train.import_meta_graph(base_dir + model_folder_name + meta_file, clear_devices=True)
imported_meta.restore(sess, base_dir + model_folder_name + checkpoint)
graph_def = sess.graph.as_graph_def()
output_graph_def = graph_util.convert_variables_to_constants(sess, graph_def, ['MobilenetV1/Predictions/Reshape_1'])
with tf.gfile.GFile(base_dir + model_folder_name + './my_frozen.pb', "wb") as f:
f.write(output_graph_def.SerializeToString())
I have successfully created my_frozen.pb - 16590 kb . But original file size is 16,685kb, which is clearly visible in folder structure above. So this is my first question why file size is different, Am I following some wrong path.
My Second Step : Creating tflite file using bazel command
bazel run --config=opt tensorflow/contrib/lite/toco:toco -- --input_file=/path_to_folder/my_frozen.pb --output_file=/path_to_folder/model.tflite --inference_type=FLOAT --input_shape=1,224,224,3 --input_array=input --output_array=MobilenetV1/Predictions/Reshape_1
This commands give me model.tflite - 0 kb.
Trackback for bazel Command
INFO: Analysed target //tensorflow/contrib/lite/toco:toco (0 packages loaded).
INFO: Found 1 target...
Target //tensorflow/contrib/lite/toco:toco up-to-date:
bazel-bin/tensorflow/contrib/lite/toco/toco
INFO: Elapsed time: 0.369s, Critical Path: 0.01s
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/tensorflow/contrib/lite/toco/toco '--input_file=/home/ubuntu/DEEP_LEARNING/Prashant/TensorflowBasic/mobilenet_v1_1.0_224/frozengraph.pb' '--output_file=/home/ubuntu/DEEP_LEARNING/Prashant/TensorflowBasic/mobilenet_v1_1.0_224/float_model.tflite' '--inference_type=FLOAT' '--input_shape=1,224,224,3' '--input_array=input' '--output_array=MobilenetV1/Predictions/Reshape_1'
2018-04-12 16:36:16.190375: I tensorflow/contrib/lite/toco/import_tensorflow.cc:1265] Converting unsupported operation: FIFOQueueV2
2018-04-12 16:36:16.190707: I tensorflow/contrib/lite/toco/import_tensorflow.cc:1265] Converting unsupported operation: QueueDequeueManyV2
2018-04-12 16:36:16.202293: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before Removing unused ops: 290 operators, 462 arrays (0 quantized)
2018-04-12 16:36:16.211322: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before general graph transformations: 290 operators, 462 arrays (0 quantized)
2018-04-12 16:36:16.211756: F tensorflow/contrib/lite/toco/graph_transformations/resolve_batch_normalization.cc:86] Check failed: mean_shape.dims() == multiplier_shape.dims()
Python Version - 2.7.6
Tensorflow Version - 1.5.0
Thanks In advance :)
The error Check failed: mean_shape.dims() == multiplier_shape.dims()
was an issue with resolution of batch norm and has been resolved in:
https://github.com/tensorflow/tensorflow/commit/460a8b6a5df176412c0d261d91eccdc32e9d39f1#diff-49ed2a40acc30ff6d11b7b326fbe56bc
In my case the error occurred using tensorflow v1.7
Solution was to use tensorflow v1.15 (nightly)
toco --graph_def_file=/path_to_folder/my_frozen.pb \
--input_format=TENSORFLOW_GRAPHDEF \
--output_file=/path_to_folder/my_output_model.tflite \
--input_shape=1,224,224,3 \
--input_arrays=input \
--output_format=TFLITE \
--output_arrays=MobilenetV1/Predictions/Reshape_1 \
--inference-type=FLOAT

sass error compiling zurb foundation with !global variable flag

The 'rake --trace assets:precompile' command gives the following error:
rake aborted!
Sass::SyntaxError: Invalid CSS after "...ules: $modules ": expected "}", was "!global;"
(in app/assets/stylesheets/foundation_and_overrides.scss:13)
foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation/_functions.scss:13
foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation/components/_global.scss:5
foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation/components/_grid.scss:5
foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation.scss:9
app/assets/stylesheets/foundation_and_overrides.scss:1327
The error appears to come from line 13 of 'foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation/_functions.scss'
8 // IMPORT ONCE
9 // We use this to prevent styles from being loaded multiple times for compenents that rely o n other components.
10 $modules: () !default;
11 #mixin exports($name) {
12 // Import from global scope
13 $modules: $modules !global;
14 // Check if a module is already on the list
15 $module_index: index($modules, $name);
16 #if (($module_index == null) or ($module_index == false)) {
17 $modules: append($modules, $name) !global;
18 #content;
19 }
20 }
The SASS syntax looks fine to me, and compiles without error provided I have made no edits to the generated 'app/assets/stylesheets/foundation_and_overrides.scss.' If I make the smallest change to that file, such as the following, the compilation error occurs.
--- a/app/assets/stylesheets/foundation_and_overrides.scss
+++ b/app/assets/stylesheets/foundation_and_overrides.scss
## -14,7 +14,7 ## $base-font-size: 100% !default;
// Since the typical default browser font-size is 16px, that makes the calculation for grid siz
// If you want your base font-size to be a different size and not have it effect grid size too,
// set the value of $em-base to $base-font-size ($em-base: $base-font-size;)
-$em-base: 16px !default;
+$em-base: 17px !default;
// It strips the unit of measure and returns it
#function strip-unit($num) {
Environment is Rails 4.0.8, foundation-rails 5.5.0.0
The foundation-rails gem has set the lower bounds on their Sass dependency to >= 3.2.0, but are using a Sass 3.3 feature (the !global flag). You'll need to specify a dependency for 3.3 for your project.
I also recommend submitting a bug report to the maintainers of foundation-rails.

Mage_Selenium_Driver::doCommand() should be compatible with that of PHPUnit_Extensions_SeleniumTestCase_Driver

I am trying to configure Magento test automation framework on my system.
When I run phpunit in command line, I am getting following error. Same error I am getting while running test in the netbeans.
Strict Standards: Declaration of Mage_Selenium_Driver::doCommand() should
be compatible with that of PHPUnit_Extensions_SeleniumTestCase_Driver::doCommand()
in C:\MTAF\taf\lib\Mage\Selenium\Driver.php on line 38
..
Fatal error: Call to undefined method PHPUnit_Framework_TestSuite::isPublicTestMethod() in C:\MTAF\taf\lib\Mage\Selenium\TestCase.php on line 2502
Can some one please suggest some solution for the same.
I changed the code, this is the change I performed:
--- a/framework/Mage/Selenium/TestCase.php
+++ b/framework/Mage/Selenium/TestCase.php
## -409,7 +409,7 ## class Mage_Selenium_TestCase extends PHPUnit_Extensions_SeleniumTestCase
$testMethods = array();
$class = new ReflectionClass(self::$_testClass);
foreach ($class->getMethods() as $method) {
- if (PHPUnit_Framework_TestSuite::isPublicTestMethod($method)) {
+ if ($method->isPublic()) {
$testMethods[] = $method->getName();
}
}
I was getting this error when running phpunit >= 4.0. Downgrading to 3.7.x solved it for me.

doxygen error state 21 with fortran code

I was searching the web for help and didn't find any. Thats why I thought it might be a good idea to document my problem here.
I had the following problem while documenting a really old (15-20 years) FORTRAN-Code with doxygen. I have a file with the same filename as the subroutine in it. And some of these files gave me an error:
********************************************************************
Error in file FILENAME line: XX, state: 21
********************************************************************
I didn't figure out, what the error state 21 is. After some digging into the code I did find the problem. I have a WRITE-command like
WRITE(*,'('' THIS IS SOME TEXT ''
+ '' THIS IS SOME MORE TEXT : '',I6,
+ /'' AND EVEN MORE TEXT ! '')')
+ VARIABLE
The problem here is the exclamation mark (!) in the code line. Doxygen seems to interpret the end of the line after the exclamation mark as doxygen syntax and not FORTRAN code. I changed the line into
WRITE(*,'('' THIS IS SOME TEXT ''
+ '' THIS IS SOME MORE TEXT : '',I6,
+ /'' AND EVEN MORE TEXT ! ''
+ )')VARIABLE
and now everything works fine!

Dojo Custom Build Error

My HTML File : buildCheck.html
<SCRIPT src="/dojo/dojo.js"></SCRIPT>
<SCRIPT>
dojo.require("dijit.form.Button");
dojo.require("dijit.form.CheckBox");
dojo.require("dijit.form.ComboBox");
dojo.require("dijit.Dialog");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("my.app");
</SCRIPT>
Command :
>build.bat action=release htmlFiles=../../buildCheck1.html profile=myProfile
Error :
kwArgs.htmlFiles ../../buildCheck1.html
release: Using profile: profiles/myProfile.profile.js
release: Using version number: 0.0.0.dev for the release.
release: Deleting: ../../release/dojo
release: Copying: ../dojo/../dijit to: ../../release/dojo/dijit
release: ********** Not Copied: ../dojo/../dijit
release: Copying: ../dojo/../dojox to: ../../release/dojo/dojox
release: ********** Not Copied: ../dojo/../dojox
release: Copying: ../dojo to: ../../release/dojo/dojo
release: ********** Not Copied: ../dojo
release: Building dojo.js and layer files
js: "./../../dojo/_base/_loader/loader.js", line 423: exception from uncaught Ja
vaScript throw: Error: Could not load 'dojo.i18n'; last tried '../../release/doj
o/dojo/i18n.js'
I am geeting this error if i add the below component
dojo.require("dojo.data.ItemFileReadStore")
after removal the component build is working fine.
What can be the issue?What should i add to avoid this error?
It looks like at the point the error occurs, dojo/i18n has not yet been built. It seems weird to me, that you say it is the ItemFileReadStore - as noting in the dojo.data requires localization.
Try adding a manual dojo.require("dojo.i18n"); to your .html above any dijits reqs
I don't know how you had your files organized, but in my case, I had it like this:
- js
- dojo_require.js (the file with "dojo.require" statements, just like your "buildCheck.html")
- dojo-release-1.6.1-src (dojo files)
- dijit
- dojo
- dojox
- util
- buildscripts
- release
And I faced exactly the same problem. I figured out this happens, when the html file contains any require that loads something from the 'dojo' folder. dojo.require("dijit.<*>") is fine, dojo.require("dojox.<*>") is fine, but dojo.require("dojo.<*>") causes the build script to use an incorrect relative path to dojo. I was getting the same output as you:
release: Deleting: ../../release/dojo
release: Copying: ../dojo/../dijit to: ../../release/dojo/dijit
But I should have got something like Copying: ../../dojo/../dijit to: ../../release/dojo/dijit instead. One ../ was missing.
Now, it is probably a bug (I am lazy to investigate it further), and since 1.6 is a pretty old version of dojo, the correct fix should be to upgrade. But since at some occasions, it is just too much pain, here is a dirty hack that made it possible for my buildscript to run and finish:
In dojo-release-1.6.1-src/util/buildscripts/build.js, on the line 107, add this line:
prefixPath = '../' + prefixPath;
So that the entire block of code looks like this:
for(var i = 0; i < prefixes.length; i++){
var prefixName = prefixes[i][0];
var prefixPath = prefixes[i][1];
prefixPath = '../' + prefixPath; // HACK!
var finalPrefixPath = prefixPath;
if(finalPrefixPath.indexOf(".") == 0 && prefixName != "dojo"){
finalPrefixPath = dojoPrefixPath + "/" + prefixPath;
}
_copyToRelease(prefixName, finalPrefixPath, kwArgs, buildLayers);
if(kwArgs.symbol){
var releasePath = kwArgs.releaseDir + "/" + prefixName.replace(/\./g, "/");
buildUtil.insertSymbols(releasePath, kwArgs);
}
}